Module: Gqldb
- Defined in:
- lib/tina4_ultipa/pb.rb
Overview
Hand-rolled proto3 wire codec for the gqldb messages this driver uses.
The grpc gem calls MessageClass.encode(msg) and MessageClass.decode(bytes)
on whatever class we register with the stub. We supply those two class
methods so grpc has no idea protobuf isn't in the loop. No google-protobuf
runtime, no descriptor pool, no generated stubs.
What we speak:
Envelopes: LoginRequest / LoginResponse / GqlRequest / GqlResponse
Nested: Parameter / TypedValue / Row / DmlStats
Enum: PropertyType (integer constants + symbol lookup for codec parity)
Proto3 rules we honour:
* default scalar values are NOT written to the wire
* unknown fields on read are skipped (server may add fields; we ignore them)
* repeated scalar strings/bytes/messages are NOT packed (one tag per element)
* repeated numeric scalars would be packed - this schema has none
NOT implemented (gqldb.proto does not use them; adding any is a self-contained ~15-line extension):
oneof, map<>, Any, packed scalars, groups, edition-2023 features.
Defined Under Namespace
Modules: PropertyType, Wire Classes: DmlStats, GqlRequest, GqlResponse, LoginRequest, LoginResponse, Parameter, Reader, Row, TypedValue