Skip to content

variant_object_construct: Support array arguments #13

Description

@friendlymatthew

See:

# todo: uncomment when we support array cases
# # Test 6: Construct objects from table data
# query T
# SELECT variant_pretty(
# variant_object_construct(
# 'name', json_to_variant('"' || name || '"'),
# 'age', json_to_variant(CAST(age AS TEXT)),
# 'active', json_to_variant(CAST(active AS TEXT))
# )
# ) FROM test_data ORDER BY id;
# ----
# {"name": ShortString(ShortString("Alice")), "age": Int32(30), "active": Bool(true)}
# {"name": ShortString(ShortString("Bob")), "age": Int32(25), "active": Bool(false)}
# {"name": ShortString(ShortString("Charlie")), "age": Int32(35), "active": Bool(true)}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions