Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/operations/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ export function dropFunction(mOptions: MigrationOptions) {
export function createFunction(mOptions: MigrationOptions) {
// eslint-disable-next-line default-param-last
const _create: CreateFunction = (functionName, functionParams = [], functionOptions, definition) => {
const { replace, returns = 'void', language, window, behavior = 'VOLATILE', onNull, parallel } = functionOptions
const options = []
const {
replace,
returns = 'void',
language,
window,
behavior = 'VOLATILE',
onNull,
parallel,
options = [],
} = functionOptions
if (behavior) {
options.push(behavior)
}
Expand Down
1 change: 1 addition & 0 deletions src/operations/functionsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface FunctionOptions {
behavior?: 'IMMUTABLE' | 'STABLE' | 'VOLATILE'
onNull?: boolean
parallel?: 'UNSAFE' | 'RESTRICTED' | 'SAFE'
options?: string[]
}

type CreateFunctionFn = (
Expand Down