Skip to content

Commit

Permalink
feat: Update result_set.proto to return undeclared parameters in Exec…
Browse files Browse the repository at this point in the history
…uteSql API

PiperOrigin-RevId: 480025979

Source-Link: googleapis/googleapis@cb6fbe8

Source-Link: googleapis/googleapis-gen@bf166b8
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU3Bhbm5lci5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYmYxNjZiODlkMmE2YWEzNTEwMzc0Mzg3YWYwZjQ1ZTQ4MjhkZWEwMyJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Oct 10, 2022
1 parent c359c4a commit cb86746
Showing 1 changed file with 73 additions and 13 deletions.
86 changes: 73 additions & 13 deletions apis/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ResultSet.g.cs
Expand Up @@ -36,24 +36,26 @@ public static partial class ResultSetReflection {
"ci52MS5SZXN1bHRTZXRNZXRhZGF0YRImCgZ2YWx1ZXMYAiADKAsyFi5nb29n",
"bGUucHJvdG9idWYuVmFsdWUSFQoNY2h1bmtlZF92YWx1ZRgDIAEoCBIUCgxy",
"ZXN1bWVfdG9rZW4YBCABKAwSMAoFc3RhdHMYBSABKAsyIS5nb29nbGUuc3Bh",
"bm5lci52MS5SZXN1bHRTZXRTdGF0cyJ5ChFSZXN1bHRTZXRNZXRhZGF0YRIv",
"Cghyb3dfdHlwZRgBIAEoCzIdLmdvb2dsZS5zcGFubmVyLnYxLlN0cnVjdFR5",
"cGUSMwoLdHJhbnNhY3Rpb24YAiABKAsyHi5nb29nbGUuc3Bhbm5lci52MS5U",
"cmFuc2FjdGlvbiK5AQoOUmVzdWx0U2V0U3RhdHMSMAoKcXVlcnlfcGxhbhgB",
"IAEoCzIcLmdvb2dsZS5zcGFubmVyLnYxLlF1ZXJ5UGxhbhIsCgtxdWVyeV9z",
"dGF0cxgCIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSGQoPcm93X2Nv",
"dW50X2V4YWN0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vZ2xlLkNsb3VkLlNwYW5uZXIuVjHKAhdHb29nbGVcQ2xv",
"dWRcU3Bhbm5lclxWMeoCGkdvb2dsZTo6Q2xvdWQ6OlNwYW5uZXI6OlYxYgZw",
"cm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, global::Google.Cloud.Spanner.V1.QueryPlanReflection.Descriptor, global::Google.Cloud.Spanner.V1.TransactionReflection.Descriptor, global::Google.Cloud.Spanner.V1.TypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSet), global::Google.Cloud.Spanner.V1.ResultSet.Parser, new[]{ "Metadata", "Rows", "Stats" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.PartialResultSet), global::Google.Cloud.Spanner.V1.PartialResultSet.Parser, new[]{ "Metadata", "Values", "ChunkedValue", "ResumeToken", "Stats" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSetMetadata), global::Google.Cloud.Spanner.V1.ResultSetMetadata.Parser, new[]{ "RowType", "Transaction" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSetMetadata), global::Google.Cloud.Spanner.V1.ResultSetMetadata.Parser, new[]{ "RowType", "Transaction", "UndeclaredParameters" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.ResultSetStats), global::Google.Cloud.Spanner.V1.ResultSetStats.Parser, new[]{ "QueryPlan", "QueryStats", "RowCountExact", "RowCountLowerBound" }, new[]{ "RowCount" }, null, null, null)
}));
}
Expand Down Expand Up @@ -843,6 +845,7 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
public ResultSetMetadata(ResultSetMetadata other) : this() {
rowType_ = other.rowType_ != null ? other.rowType_.Clone() : null;
transaction_ = other.transaction_ != null ? other.transaction_.Clone() : null;
undeclaredParameters_ = other.undeclaredParameters_ != null ? other.undeclaredParameters_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -890,6 +893,30 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
}
}

/// <summary>Field number for the "undeclared_parameters" field.</summary>
public const int UndeclaredParametersFieldNumber = 3;
private global::Google.Cloud.Spanner.V1.StructType undeclaredParameters_;
/// <summary>
/// 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" } },
/// ]
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Cloud.Spanner.V1.StructType UndeclaredParameters {
get { return undeclaredParameters_; }
set {
undeclaredParameters_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand All @@ -907,6 +934,7 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
}
if (!object.Equals(RowType, other.RowType)) return false;
if (!object.Equals(Transaction, other.Transaction)) return false;
if (!object.Equals(UndeclaredParameters, other.UndeclaredParameters)) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -916,6 +944,7 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
int hash = 1;
if (rowType_ != null) hash ^= RowType.GetHashCode();
if (transaction_ != null) hash ^= Transaction.GetHashCode();
if (undeclaredParameters_ != null) hash ^= UndeclaredParameters.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand All @@ -942,6 +971,10 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
output.WriteRawTag(18);
output.WriteMessage(Transaction);
}
if (undeclaredParameters_ != null) {
output.WriteRawTag(26);
output.WriteMessage(UndeclaredParameters);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -960,6 +993,10 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
output.WriteRawTag(18);
output.WriteMessage(Transaction);
}
if (undeclaredParameters_ != null) {
output.WriteRawTag(26);
output.WriteMessage(UndeclaredParameters);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -976,6 +1013,9 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
if (transaction_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transaction);
}
if (undeclaredParameters_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(UndeclaredParameters);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand All @@ -1000,6 +1040,12 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
}
Transaction.MergeFrom(other.Transaction);
}
if (other.undeclaredParameters_ != null) {
if (undeclaredParameters_ == null) {
UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType();
}
UndeclaredParameters.MergeFrom(other.UndeclaredParameters);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand Down Expand Up @@ -1029,6 +1075,13 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
input.ReadMessage(Transaction);
break;
}
case 26: {
if (undeclaredParameters_ == null) {
UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType();
}
input.ReadMessage(UndeclaredParameters);
break;
}
}
}
#endif
Expand Down Expand Up @@ -1058,6 +1111,13 @@ public sealed partial class ResultSetMetadata : pb::IMessage<ResultSetMetadata>
input.ReadMessage(Transaction);
break;
}
case 26: {
if (undeclaredParameters_ == null) {
UndeclaredParameters = new global::Google.Cloud.Spanner.V1.StructType();
}
input.ReadMessage(UndeclaredParameters);
break;
}
}
}
}
Expand Down

0 comments on commit cb86746

Please sign in to comment.