Mfunction
Bun

method

sqlite.DatabaseSync.function

name: string,
options: FunctionOptions,
func: (...args: SQLOutputValue[]) => SQLInputValue
): void;
@param name

The name of the SQLite function to create.

@param options

Optional configuration settings for the function.

@param func

The JavaScript function to call when the SQLite function is invoked. The return value of this function should be a valid SQLite data type: see Type conversion between JavaScript and SQLite. The result defaults to NULL if the return value is undefined.

name: string,
func: (...args: SQLOutputValue[]) => SQLInputValue
): void;
@param name

The name of the SQLite function to create.

@param func

The JavaScript function to call when the SQLite function is invoked. The return value of this function should be a valid SQLite data type: see Type conversion between JavaScript and SQLite. The result defaults to NULL if the return value is undefined.

Referenced types

interface FunctionOptions