-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node:sqlite: DatabaseSync.function
wrapper for sqlite3_create_function_v2
should allow use of xStep
and xFinal
parameters
#56510
Comments
i created this issue from the line highlight menu on node_sqlite.cc, so i didn't get the template prompt or label selection. sorry if this is out-of-order |
That is the plan - similar to how it is done in better-sqlite3. |
is there a place for collected discussion and public work on this builtin? |
Not that I am aware of. |
better-sqlite3 uses I think implementing |
sqlite api treats window aggregate functions as distinct from other types of aggregate functions. a wrapper that combines the metaphors must use the api conditionally. your linked example also uses the v2 api on line 316 |
I see. The linked example is for aggregate function specifically. From other issues, I can see that |
i want to create user-defined aggregate functions when using my sqlite database. sqlite expects aggregate functions to be defined with the same api as typical user-defined functions, plus additional aggregation parameters.
node:sqlite
provides access to the sqlite function definition api with a wrapper forsqlite3_create_function_v2
as the instance methodDatabaseSync.function
but, this wrapper always passes
null
for the aggregation parameter refs.node/src/node_sqlite.cc
Lines 669 to 677 in 3b5f235
implementation suggestions
aggregate
orreduce
, for user-defined functions that use these additional callback parametersfunction
that accept the callbacks, in the same order as the sqlite apifunction
options parameter objectThe text was updated successfully, but these errors were encountered: