You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,9 @@ Examples:
13
13
```sql
14
14
SELECT protobuf_query('MyProto:some_submessage.some_map[some_key]', my_proto_column) FROM ...;
15
15
16
-
-- or for multiple results
16
+
-- or for multiple results as an array
17
+
SELECT protobuf_query_array('MyProto:some_repeated_field[*].some_map[*].some_field', my_proto_column) FROM ...;
18
+
-- or as rows
17
19
SELECT protobuf_query_multi('MyProto:some_repeated_field[*].some_map[*].some_field', my_proto_column) FROM ...;
18
20
```
19
21
@@ -96,7 +98,8 @@ SELECT protobuf_query('path.to.Message:path.to.field', protobuf_as_byte_array) A
96
98
The following functions are defined:
97
99
98
100
-`protobuf_query(query, protobuf)` returns the first matching field in the protobuf, or NULL if missing or proto3 default.
99
-
-`protobuf_query_multi(query, protobuf)` returns all matching fields in the protobuf. Missing or proto3 default values are not returned.
101
+
-`protobuf_query_array(query, protobuf)` returns all matching fields in the protobuf as a text array. Missing or proto3 default values are not returned.
102
+
-`protobuf_query_multi(query, protobuf)` returns all matching fields in the protobuf as a set of rows. Missing or proto3 default values are not returned.
100
103
-`protobuf_to_json_text(protobuf_type, protobuf)` converts the protobuf to a JSON string, assuming it's of the given type.
101
104
-`protobuf_from_json_text(protobuf_type, json_str)` parses a protobuf from a JSON string, assuming it's of the given type.
102
105
-`protobuf_extension_version()` returns the extension version `X.Y.Z` as a number `X*10000+Y*100+Z`.
0 commit comments