import { Constructor } from '@spinajs/di'; import { InsertBehaviour } from './interfaces.js'; import { ModelBase } from './model.js'; /** * * Gets entity from db * * @param idOrEntity - pkey or entity * @param c - entity class constructor * @param fresh - if entity, should it refresh from DB ? * @returns */ export declare function getEntity(idOrEntity: number | T, c: Constructor, fresh?: boolean): Promise; /** * Update model with data * * @param model model to update * @param data data to update * @returns */ export declare function updateModel(model: T, data?: Partial): Promise; /** * * Insert model into database * * @param model model or models to insert * @param behaviour insert behaviour * @returns */ export declare function insertModel(model: T | T[], behaviour?: InsertBehaviour): Promise; export declare function insertOrUpdateModel(model: T): Promise; /** * * Delete model from database * * @param model model to delete * @returns */ export declare function deleteModel(model: T): Promise; //# sourceMappingURL=helpers.d.ts.map