import { Constructor } from '@spinajs/di'; import { InsertBehaviour } from './interfaces.js'; import { ModelBase } from './model.js'; /** * Functional-style wrappers kept for compatibility and composability - * each delegates to its imperative counterpart in helpers.ts. */ /** * * 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 data data to update * @returns */ export declare function _update(data?: Partial): (model: T) => Promise; /** * * Insert model into database * * @returns */ export declare function _insert(behaviour?: InsertBehaviour): (model: T | T[]) => Promise; export declare function _insertOrUpdate(): (model: T) => Promise; /** * * Delete model from database * * @returns */ export declare function _delete(): (model: T) => Promise; //# sourceMappingURL=fp.d.ts.map