DbFunction - do-/node-doix-db GitHub Wiki
DbFunction
is a DbRoutine descendant representing a user defined function.
As for all DbObject's descendants, instances of this class should only be created by calling DbSchema
's create method (normally, in the course of adding).
Properties
Name | Type | Description |
---|---|---|
returns |
String | The return data type name |
Sample description
// module.exports =
{
label: 'My own function',
/*
parameters: [
'id INT',
'delta DECIMAL (10,2) = 0',
'OUT accrued DECIMAL (10,2)',
{
name: 'xtra',
mode: 'INOUT',
type: 'TEXT',
default: "''",
},
],
*/
returns: 'BOOLEAN',
lang: 'SQL',
body: `NOW () IS NULL`,
/*
options: [
'VENDOR SPECIFIC 1',
'VENDOR SPECIFIC 2',
],
*/
}