cloudspannerecosystem / memefish

memefish is the foundation to analyze Spanner SQL
https://cloudspannerecosystem.dev/memefish/
MIT License
76 stars 19 forks source link

Support protobuf NEW operators #119

Closed apstndb closed 2 weeks ago

apstndb commented 1 month ago

Part of #89

This PR adds NEW operators for Protocol Buffers.

https://cloud.google.com/spanner/docs/reference/standard-sql/operators#new_operator

NEW protocol_buffer {...}: Creates a protocol buffer using a map constructor.

NEW protocol_buffer {
  field_name: literal_or_expression
  field_name { ... }
  repeated_field_name: [literal_or_expression, ... ]
}

NEW protocol_buffer (...): Creates a protocol buffer using a parenthesized list of arguments.

NEW protocol_buffer(field [AS alias], ...field [AS alias])
apstndb commented 1 month ago

Rebase to use ast.NamedType.

apstndb commented 1 month ago

Updated to use helper functions #120

apstndb commented 3 weeks ago

Merge to use parseCommaSeparatedList().

apstndb commented 3 weeks ago

Merge to include ARRAY fix