{"version":3,"sources":["../browser/src/decorator/entity-view/ViewEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,QAAQ,CAAC;AAgB9C;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,aAAwC,EAAE,YAAgC;IACjG,IAAM,OAAO,GAAG,CAAC,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAkC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9G,IAAM,IAAI,GAAG,OAAO,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAE9E,OAAO,UAAU,MAAgB;QAC7B,sBAAsB,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;YACjC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACzD,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACjC,CAAC,CAAC;IAC5B,CAAC,CAAC;AACN,CAAC","file":"ViewEntity.js","sourcesContent":["import {getMetadataArgsStorage} from \"../../\";\nimport {TableMetadataArgs} from \"../../metadata-args/TableMetadataArgs\";\nimport {ViewEntityOptions} from \"../options/ViewEntityOptions\";\n\n/**\n * This decorator is used to mark classes that will be an entity view.\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function ViewEntity(options?: ViewEntityOptions): Function;\n\n/**\n * This decorator is used to mark classes that will be an entity view.\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function ViewEntity(name?: string, options?: ViewEntityOptions): Function;\n\n/**\n * This decorator is used to mark classes that will be an entity view.\n * Database schema will be created for all classes decorated with it, and Repository can be retrieved and used for it.\n */\nexport function ViewEntity(nameOrOptions?: string|ViewEntityOptions, maybeOptions?: ViewEntityOptions): Function {\n const options = (typeof nameOrOptions === \"object\" ? nameOrOptions as ViewEntityOptions : maybeOptions) || {};\n const name = typeof nameOrOptions === \"string\" ? nameOrOptions : options.name;\n\n return function (target: Function) {\n getMetadataArgsStorage().tables.push({\n target: target,\n name: name,\n expression: options.expression,\n type: \"view\",\n database: options.database ? options.database : undefined,\n schema: options.schema ? options.schema : undefined,\n } as TableMetadataArgs);\n };\n}\n"],"sourceRoot":"../.."}
|