Clear::SQL::JSONB
Instance methods
jsonb ?& operator
Do all of these array strings exist as top-level keys?
jsonb ?| operator
Do any of these array strings exist as top-level keys?
jsonb_eq(field, key, value)
Test equality using the @> operator
jsonb_eq("data.sub.key", "value")
=> data @> '{"sub": {"key": "value"}}'
jsonb_resolve(field, key : String, cast = nil)
Return text selector for the field/key :
jsonb_text("data", "sub.key").like("user%")
# => "data->'sub'->>'key' LIKE 'user%'"