encode_struct

Function encode_struct 

Source
fn encode_struct(
    _query_ctx: &QueryContextRef,
    struct_value: StructValue,
    builder: &mut DataRowEncoder,
) -> PgWireResult<()>
Expand description

this function will encode greptime’s StructValue into PostgreSQL jsonb type

Note that greptimedb has different types of StructValue for storing json data, based on policy defined in JsonStructureSettings. But here the StructValue should be fully structured.

there are alternatives like records, arrays, etc. but there are also limitations: records: there is no support for include keys arrays: element in array must be the same type