Skip to main content
Module

x/sqlite3/mod.ts>Database#function

The fastest and correct module for SQLite3 in Deno.
Go to Latest
method Database.prototype.function
Re-export
import { Database } from "https://deno.land/x/sqlite3@0.7.3/mod.ts";

Creates a new user-defined function.

Example:

db.function("add", (a: number, b: number) => a + b);
db.prepare("select add(1, 2)").value<[number]>()!; // [3]

Parameters

name: string
fn: CallableFunction
optional
options: FunctionOptions