ts-db-helper
Version:
Simple ORM based on TypeScript
57 lines (56 loc) • 1.49 kB
TypeScript
import { QueryPart } from './queries/query-part.model';
/**
* @public
* @class DbQuery
*
* @description
* This class is a model to share query informations specifically to
* the query connector.
*
* @author Olivier Margarit
* @since 0.1
*/
export declare class DbQuery {
/**
* @public
* @property {number} page the page number to retrieve for select queries
*/
page: number;
/**
* @public
* @property {Array<any>} params list of params of the query, see the sqlite
* documenetations to learn about query parameters
*/
params: any[];
/**
* @public
* @property {string} query the query string
*/
query: string;
/**
* @public
* @property {number} size the number of result to retrieve per page
* on select statement
*/
size: number;
/**
* @public
* @property {string} table the table name of the main query target
*/
table: string;
/**
* @public
* @property {string} type the type of query, ie SELECT, INSERT, UPDATE, DELETE
*/
type: string;
/**
* @public
* @method append is a part of private API.
* this method is used to build query by appending part of it
*
* @param {QueryPart} queryPart query part to append
*
* @return {DbQuery} the db query instance to chain part appending
*/
append(queryPart: QueryPart): DbQuery;
}