pgo icon indicating copy to clipboard operation
pgo copied to clipboard

Support ARRAY fields

Open thelinuxlich opened this issue 2 years ago • 5 comments

I think the current implementation doesn't support yet passing lists as parameters so we can use PostgreSQL Arrays

thelinuxlich avatar Aug 17 '23 01:08 thelinuxlich

Arrays should work, but I now see we have fewer tests for them than I thought https://github.com/erleans/pgo/blob/main/test/pgo_basic_SUITE.erl#L402

How are you trying to use them? Wondering if its a casting issue.

tsloughter avatar Aug 17 '23 09:08 tsloughter

I'm using it with gleam_pgo, which needs something like a pgo.array so I can pass array parameters when inserting into array fields

thelinuxlich avatar Aug 18 '23 13:08 thelinuxlich

Is it that it doesn't work if you give PGO a list, or is it that a list function needs to be added to gleam_pgo? If the latter that can be easily done 👍

lpil avatar Aug 18 '23 13:08 lpil

Gleam_pgo doen't have a pgo.list() and I don't know if it exists on PGO

thelinuxlich avatar Aug 19 '23 02:08 thelinuxlich

PGO doesn't have argument functions as it is dynamically typed, one can pass in any value as an argument. If it's just the Gleam function and PGO supports arrays we can move this issue to the Gleam project or just add that function.

lpil avatar Aug 19 '23 06:08 lpil