MySQL.compileStatement()

Compile a Waterline statement to a native query for MySQL.

Usage

Hover over inputs/exits for more info.

var MySQL = require('machinepack-mysql');


// Compile a Waterline statement to a native query for MySQL.

MySQL.compileStatement({

statement: {},

meta: '===',

}).execSync();

Inputs

statement required

A Waterline statement.

{}
meta

Additional stuff to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

malformed

The provided Waterline statement could not be compiled due to malformed syntax.

{ error: '===', meta: '===' }
notSupported

The provided Waterline statement could not be compiled because it is not supported by this MySQL driver.

{ error: '===', meta: '===' }
success

OK.

{ nativeQuery: '*', meta: '===' }