Skip to main content
Version: Next

RoutineConfig <T>

Routine declaration shape accepted by the Routine class.

Hierarchy

  • Omit<RoutineDef<T>, name>
    • RoutineConfig

Index

Properties

optionalinheritedbody

body?: string | RawQueryFragment<string> | RoutineBodyCallback<T>

Mutually exclusive with expression.

optionalinheritedbodyJs

bodyJs?: RoutineJsBody<T>

JS fallback registered as a UDF on SQLite (better-sqlite3). Functions only.

optionalinheritedcomment

comment?: string

optionalinheriteddataAccess

dataAccess?: RoutineDataAccess

MySQL/MariaDB only.

optionalinheriteddefiner

definer?: string

User the routine runs as when security: 'definer'.

optionalinheriteddeterministic

deterministic?: boolean

optionalinheritedexpression

expression?: string

Raw CREATE PROCEDURE/FUNCTION escape hatch — schema diff can't detect changes. Prefer body.

optionalinheritedignoreSchemaChanges

ignoreSchemaChanges?: RoutineIgnoreField[]

Skip selected fields in schema diff; useful when the engine normalises the body differently.

optionalinheritedlanguage

language?: AnyString | sql | plpgsql | tsql | plsql

name

name: string

optionalparams

params?: Record<string, RoutineParamConfig>

Order is preserved from Object.keys.

optionalinheritedreturns

returns?: RoutineReturns<T>

optionalinheritedschema

schema?: string

optionalinheritedsecurity

security?: RoutineSecurity

inheritedtype

type: RoutineKind