MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / customFunctionArg

Function customFunctionArg

test/40.bigints.js:78–82  ·  view source on GitHub ↗
(name, options, dontDefine)

Source from the content-addressed store, hash-verified

76 let arg;
77 const int = BigInt('1006028374637854687');
78 const customFunctionArg = (name, options, dontDefine) => {
79 dontDefine || this.db.function(name, options, (a) => { arg = a; });
80 this.db.prepare(`SELECT ${name}(?)`).get(int);
81 return arg;
82 };
83 const customAggregateArg = (name, options, dontDefine) => {
84 dontDefine || this.db.aggregate(name, { ...options, step: (_, a) => { arg = a; } });
85 this.db.prepare(`SELECT ${name}(?)`).get(int);

Callers 1

40.bigints.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected