-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Description
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 for sqlite3_create_function_v2
as the instance method DatabaseSync.function
but, this wrapper always passes null
for the aggregation parameter refs.
Lines 669 to 677 in 3b5f235
int r = sqlite3_create_function_v2(db->connection_, | |
*name, | |
argc, | |
text_rep, | |
user_data, | |
UserDefinedFunction::xFunc, | |
nullptr, | |
nullptr, | |
UserDefinedFunction::xDestroy); |
implementation suggestions
- a separate wrapper function, possibly called
aggregate
orreduce
, for user-defined functions that use these additional callback parameters - optional parameters for
function
that accept the callbacks, in the same order as the sqlite api - additional attributes on the
function
options parameter object
Metadata
Metadata
Assignees
Labels
sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.