Skip to content

Database.function() method

Home > @direct-sqlite/core > Database > function

Binds a custom JavaScript runtime algorithm which is directly executable in SQL queries.

Signature:

function(name: string, callback: (...args: any[]) => any): this;

Parameter

Type

Description

name

string

The name of the function to register.

callback

(…args: any[]) => any

The function to be called when the SQL function is invoked.

Returns:

this