Module: nodeMysqlConn

Wrappers for "mysql" module for node.js
Source:

Methods

(static) query(ctx, connection, sql, params, allowDestroy) → {Object}

Cancellable wrapper for mysql#connection#query (node) Returns object with following properties - 'data' set to content result set in case of success - 'error' set to error in case of failure - 'fields' set to list of fileds from the query Triggers exception in nsynjs-executed caller in case if error is set
Parameters:
Name Type Description
ctx State Context of nsynjs-executed caller, accessible via built-in variable
connection Object Object, created by mysql.createConnection
sql String SQL query to execute
params Array Parameters of SQL query
allowDestroy Boolean Whether to use connection.destroy() when stop is requested
Source:
Throws:
Exception
Returns:
query results
Type
Object