Class: SQLExecutor

SQLExecutor()

new SQLExecutor()

Source:

Methods

execute(callbackopt, metacbopt) → {Promise.<Result>}

Execute SQL from Session#executeSql
Parameters:
Name Type Attributes Description
callback SQLExecutor~RowMetaCallbackObject | SQLExecutor~RowCallback <optional>
Either a callback called on each row or an object containing meta and row callbacks
metacb SQLExecutor~MetaCallback <optional>
A callback called on meta data
Source:
Returns:
Type
Promise.<Result>

Type Definitions

Meta

Meta Data from SQL
Type:
  • Object
Properties:
Name Type Description
type Number Type of the field
name String Name of the field
original_name String Original name of the field (i.e. if aliased)
table String Name of the table
original_table String Original name of the table (i.e. if aliased)
schema String Name of the schema of the table
catalog String Currently always 'def'
collation Number
fractional_digits Number Number of fractional digits
length Number Length of the field
Source:

MetaCallback(meta)

Meta Callback
Parameters:
Name Type Description
meta Column data
Source:

RowCallback(row)

Row Callback
Parameters:
Name Type Description
row array
Source:

RowMetaCallbackObject

Object holding row and meta data callbacks
Type:
  • Object
Properties:
Name Type Description
meta SQLExecutor~MetaCallback callback for meta data, called for each result set
row SQLExecutor~RowCallback callback called for each row
Source: