Open laeo opened 1 year ago
I have a uuid[] field, and i have to filter data using contains method.
uuid[]
contains
VSCode shows the .contains() accept a string | Record<string, unknown> | unknown[] as second param, but it will errors when i pass a string value,
string | Record<string, unknown> | unknown[]
string
{ code: "22P02", details: 'Array value must start with "{" or dimension information.', hint: null, message: 'malformed array literal: "06591b00-2d5f-4af1-8203-2324323c5ff2"' }
If i pass an string[], everything looks good.
string[]
Maybe the generated type schema wrong? Or the JS lib not correctly handle them.
Thanks! We could definitely be more specific here - string is valid for range types, Record<string, unknown> is for json/jsonb, and unknown[] is for array types.
Record<string, unknown>
json
jsonb
unknown[]
I have a
uuid[]
field, and i have to filter data usingcontains
method.VSCode shows the .contains() accept a
string | Record<string, unknown> | unknown[]
as second param, but it will errors when i pass astring
value,If i pass an
string[]
, everything looks good.Maybe the generated type schema wrong? Or the JS lib not correctly handle them.