@decaf-ts/db-decorators
Version:
Agnostic database decorators and repository
32 lines (31 loc) • 1.07 kB
TypeScript
/**
* @summary Set of constants to define db CRUD operations and their equivalent 'on' and 'after' phases
* @const OperationKeys
*
* @memberOf module:db-decorators.Operations
*/
export declare enum OperationKeys {
REFLECT = "decaf.model.db.operations.",
CREATE = "create",
READ = "read",
UPDATE = "update",
DELETE = "delete",
ON = "on.",
AFTER = "after."
}
export type CrudOperations = OperationKeys.CREATE | OperationKeys.READ | OperationKeys.UPDATE | OperationKeys.DELETE;
export declare enum BulkCrudOperationKeys {
CREATE_ALL = "createAll",
READ_ALL = "readAll",
UPDATE_ALL = "updateAll",
DELETE_ALL = "deleteAll"
}
export type BulkCrudOperations = BulkCrudOperationKeys.CREATE_ALL | BulkCrudOperationKeys.READ_ALL | BulkCrudOperationKeys.UPDATE_ALL | BulkCrudOperationKeys.DELETE_ALL;
/**
* @summary Maps out groups of CRUD operations for easier mapping of decorators
*
* @constant DBOperations
*
* @memberOf module:db-decorators.Operations
*/
export declare const DBOperations: Record<string, CrudOperations[]>;