MySQL.parseNativeQueryResult()

Parse a raw result from a native query and normalize it for the specified query type.

Usage

Hover over inputs/exits for more info.

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


// Parse a raw result from a native query and normalize it for the specified query type.

MySQL.parseNativeQueryResult({

queryType: 'select',

nativeQueryResult: '===',

meta: '===',

}).execSync();

Inputs

queryType required

The type of query operation this raw result came from.

'select'
nativeQueryResult required

The result data sent back from the the database as a result of a native query.

'==='
meta

Additional stuff to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

success

OK.

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