Support for JSON functions with mixed type/arity like json_build_object #151
Replies: 1 comment
-
|
We could think of something like that, yes. That makes sense. That said, I think it would be more like For instance:
As for the json_agg, that's another topic ! I suggest we discuss it on another thread 🙂 Sorry for the late reply. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all: I love 🎉 that this library exists, and want to use it super much :)
But, in my project, I use a bunch of JSON stuff. I tried adding
json_build_objectviadb.public.registerFunction, but can't get it to work due to its variable arity and typing. I'm thinking, maybe the overload-checking ofregisterFunctioncould be (optionally) inverted? E.g. instead of setting theargsoption, setting an option likeacceptArgs: (args) => boolean? ..and then also passing the types along with the args when invoking the function somehow.Has this idea, or the JSON functions, been floated before? I could put it some work into a fork, if this proposal or something similar sounds reasonable?
(Another issue I'm running into, btw, is using
table.*, which I use a lot as injson_agg(table.*).)Beta Was this translation helpful? Give feedback.
All reactions