Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions google/cloud/spanner_v1/types/result_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,20 @@ class ResultSetMetadata(proto.Message):
If the read or SQL query began a transaction
as a side-effect, the information about the new
transaction is yielded here.
undeclared_parameters (google.cloud.spanner_v1.types.StructType):
A SQL query can be parameterized. In PLAN mode, these
parameters can be undeclared. This indicates the field names
and types for those undeclared parameters in the SQL query.
For example, a SQL query like
``"SELECT * FROM Users where UserId = @userId and UserName = @userName "``
could return a ``undeclared_parameters`` value like:

::

"fields": [
{ "name": "UserId", "type": { "code": "INT64" } },
{ "name": "UserName", "type": { "code": "STRING" } },
]
"""

row_type = proto.Field(
Expand All @@ -250,6 +264,11 @@ class ResultSetMetadata(proto.Message):
number=2,
message=gs_transaction.Transaction,
)
undeclared_parameters = proto.Field(
proto.MESSAGE,
number=3,
message=gs_type.StructType,
)


class ResultSetStats(proto.Message):
Expand Down