interface

sqlite.FunctionOptions

interface FunctionOptions

Options for Database.function and Database.aggregate

  • deterministic?: boolean

    Promise SQLite that the function returns the same result for the same arguments. SQLite then allows it in an index and in a generated column, and can call it fewer times.

    Equivalent to SQLITE_DETERMINISTIC

  • directOnly?: boolean

    Only SQL that is passed to the Database can call the function. A view, a trigger or another part of the schema cannot. Use it for a function with side effects when the database file comes from somebody else.

    Equivalent to SQLITE_DIRECTONLY

  • safeIntegers?: boolean

    An INTEGER argument is a bigint instead of a number, and a bigint result that does not fit in a signed 64-bit integer throws a RangeError.

  • varargs?: boolean

    The SQL function takes any number of arguments, whatever the number of parameters of the JavaScript function.