Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pg_mem/interfaces.ts>FunctionDefinition

An in memory postgres DB instance for your unit tests
Latest
interface FunctionDefinition
import { type FunctionDefinition } from "https://deno.land/x/pg_mem@3.0.3/interfaces.ts";

Properties

name: string

Function name (casing doesnt matter)

optional
args: ArgDef[] | nil

Expected arguments

optional
argsVariadic: DataType | IType | nil

Other arguments type (variadic arguments)

optional
returns: DataType | IType | nil

Returned data type

optional
impure: boolean

If the function is marked as impure, it will not be simplified (ex: "select myFn(1) from myTable" will call myFn() for each row in myTable, even if it does not depend on its result)

optional
allowNullArguments: boolean

If true, the function will also be called when passing null arguments

implementation: CompiledFunction

Actual implementation of the function