ng-db-helper
Version:
Simple db helper for typescript like an orm with plugable connectors.
42 lines (41 loc) • 1.18 kB
TypeScript
import { QueryResult } from 'ts-db-helper';
/**
* @private
* @class ModelResult @implements {QueryResult<any>}
*
* @description
* This class is private part of the API.
* A specific wrapper to convert QueryResult to typed QueryResult on demand
*
* @author Olivier Margarit
* @since 0.1
*/
export declare class QueryResultWrapper implements QueryResult<any> {
private result;
/**
* @public
* @property {number} rowsAffected serve real ResultQuery rowsAffected;
*/
readonly rowsAffected: number;
/**
* @public
* @property {number|undefined} insertId serve real ResultQuery insertId;
*/
readonly insertId: number | undefined;
/**
* @public
* @property {Object} rows serve customized type ResultQuery rows;
*/
readonly rows: {
length: any;
item: (i: number) => any;
toArray: () => any[];
};
/**
* @public
* @constructor this is a private API and should not be available for integrators
*
* @param {any} result the real QueryResult converted to return typed models
*/
constructor(result: any);
}