Skip to content

Commit cb6fbe8

Browse files
Google APIscopybara-github
authored andcommitted
feat: Update result_set.proto to return undeclared parameters in ExecuteSql API
PiperOrigin-RevId: 480025979
1 parent 4a39795 commit cb6fbe8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

google/spanner/v1/result_set.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ message ResultSetMetadata {
174174
// If the read or SQL query began a transaction as a side-effect, the
175175
// information about the new transaction is yielded here.
176176
Transaction transaction = 2;
177+
178+
// A SQL query can be parameterized. In PLAN mode, these parameters can be
179+
// undeclared. This indicates the field names and types for those undeclared
180+
// parameters in the SQL query. For example, a SQL query like `"SELECT * FROM
181+
// Users where UserId = @userId and UserName = @userName "` could return a
182+
// `undeclared_parameters` value like:
183+
//
184+
// "fields": [
185+
// { "name": "UserId", "type": { "code": "INT64" } },
186+
// { "name": "UserName", "type": { "code": "STRING" } },
187+
// ]
188+
StructType undeclared_parameters = 3;
177189
}
178190

179191
// Additional statistics about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet].

0 commit comments

Comments
 (0)