UNPKG

@decaf-ts/core

Version:

Core persistence module for the decaf framework

64 lines 3.03 kB
import { DefaultRepositoryFlags } from "@decaf-ts/db-decorators"; /** * @description Persistence-related constant keys * @summary Enum containing string constants used throughout the persistence layer for metadata, relations, and other persistence-related operations * @enum {string} * @readonly * @memberOf module:core */ export var PersistenceKeys; (function (PersistenceKeys) { /** @description Key for index metadata */ PersistenceKeys["INDEX"] = "index"; /** @description Key for unique constraint metadata */ PersistenceKeys["UNIQUE"] = "unique"; /** @description Key for adapter metadata */ PersistenceKeys["ADAPTER"] = "adapter"; /** @description Template for injectable adapter names */ PersistenceKeys["INJECTABLE"] = "decaf_{0}_adapter_for_{1}"; PersistenceKeys["SERVICE"] = "service"; /** @description Key for table name metadata */ PersistenceKeys["TABLE"] = "table"; /** @description Key for column name metadata */ PersistenceKeys["COLUMN"] = "column"; /** @description Key for general metadata storage */ PersistenceKeys["METADATA"] = "__metadata"; // Ownership /** @description Key for created-by ownership metadata */ PersistenceKeys["OWNERSHIP"] = "ownership"; /** @description Key for created-by ownership metadata */ PersistenceKeys["CREATED_BY"] = "ownership.created-by"; /** @description Key for updated-by ownership metadata */ PersistenceKeys["UPDATED_BY"] = "ownership.updated-by"; // Relations /** @description Key for relations metadata storage */ PersistenceKeys["RELATIONS"] = "__relations"; /** @description Key for relations metadata storage */ PersistenceKeys["RELATION"] = "relation"; /** @description Key for one-to-one relation metadata */ PersistenceKeys["ONE_TO_ONE"] = "relation.one-to-one"; /** @description Key for one-to-many relation metadata */ PersistenceKeys["ONE_TO_MANY"] = "relation.one-to-many"; /** @description Key for many-to-one relation metadata */ PersistenceKeys["MANY_TO_ONE"] = "relation.many-to-one"; /** @description Key for many-to-one relation metadata */ PersistenceKeys["MANY_TO_MANY"] = "relation.many-to-many"; /** @description Key for populate metadata */ PersistenceKeys["POPULATE"] = "populate"; /** @description Key for populate metadata */ PersistenceKeys["NO_VALIDATE"] = "no-validate"; /** @description Key for migration classes */ PersistenceKeys["MIGRATION"] = "migration"; PersistenceKeys["STATEMENT"] = "statement"; PersistenceKeys["QUERY"] = "query"; PersistenceKeys["GENERATED"] = "generated"; })(PersistenceKeys || (PersistenceKeys = {})); export const DefaultAdapterFlags = Object.assign({}, DefaultRepositoryFlags, { allowGenerationOverride: false, enforceUpdateValidation: true, allowRawStatements: true, forcePrepareSimpleQueries: false, forcePrepareComplexQueries: false, cacheForPopulate: {}, }); //# sourceMappingURL=constants.js.map