-
Trying to do something like:
And getting: |
Beta Was this translation helpful? Give feedback.
Answered by
oguimbal
Apr 20, 2021
Replies: 1 comment 2 replies
-
Hi ! I wondered when someone would need this 😀 'array' is a type that is a bit special. I exposed the necessary methods in db.public.registerFunction({
name: 'contains',
args: [db.public.getType(DataType.integer).asArray(), DataType.integer],
returns: DataType.bool,
implementation: (array: number[], value: number) => array.contains(value)
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
oguimbal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi !
I wondered when someone would need this 😀
'array' is a type that is a bit special.
I exposed the necessary methods in
pg-mem@1.9.5
(which were there, but not exposed)... so you can do this like that: