@perdieminc/models
v2.0.0
Published
A simple crud model provider with caching support and extendable design
Downloads
338
Readme
PerDiem Models
A simple model extension for Knex to help manage cache
create<T>(record: any): Promise<T[]>;
update<T>(conditions: any, record: any, hooks?: ModelHooks): Promise<T[]>;
del<T>(conditions: any): Promise<T[]>;
get<T>(conditions: any, hooks?: ModelHooks): Promise<T>;
getAll<T>(conditions: any, options: any, hooks?: ModelHooks): Promise<T[]>;
getMany<T>(conditions: any, hooks?: ModelHooks): Promise<T[]>;