If true, the SQLITE_DETERMINISTIC flag is set on the created function.
interface
sqlite.AggregateOptions
interface AggregateOptions<T extends SQLInputValue = SQLInputValue>
- inverse?: (accumulator: T, ...args: SQLOutputValue[]) => T
When this function is provided, the
aggregatemethod will work as a window function. The function receives the current state and the dropped row value. The return value of this function should be the new state. - result?: (accumulator: T) => SQLInputValue
The function to call to get the result of the aggregation. The function receives the final state and should return the result of the aggregation.
- start: T | () => T
The identity value for the aggregation function. This value is used when the aggregation function is initialized. When a
Functionis passed the identity will be its return value. - step: (accumulator: T, ...args: SQLOutputValue[]) => T
The function to call for each row in the aggregation. The function receives the current state and the row value. The return value of this function should be the new state.
- useBigIntArguments?: boolean
If
true, integer arguments tofunctionare converted toBigInts. Iffalse, integer arguments are passed as JavaScript numbers. - varargs?: boolean
If
true,functionmay be invoked with any number of arguments (between zero andSQLITE_MAX_FUNCTION_ARG). Iffalse,functionmust be invoked with exactlyfunction.lengtharguments.