UNPKG

ts-db-helper

Version:
41 lines (40 loc) 1.14 kB
import { DbTable } from '../structure/db-table.model'; /** * @public * @class QueryCreate * * @description * this class is designed to be used behind {@link Create} function * this class is an helper to easily create a table from the data model generated with the annotations * * @example * ```typescript * Create(TodoDataModel).exec().subscribe((QueryResult<any>) = { * // todo something on create succeed * }, (err) => { * // do something with the error * }); * ``` * * @author Olivier Margarit * @since 0.1 */ export declare class QueryCreate { private table; /** * @public * @constructor should not be called directly for API design purpose * * @param {DbTable} table object with a single model infomations * generated with table and column annotations */ constructor(table: DbTable); /** * @public * @method build should be removed to be a part of the private API * * @return {DbQuery} of the query with the string part and * clauses params. */ build(): string; }