@yandjin-mikro-orm/core 6.1.4-rc-sti-changes-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EntityManager.d.ts +553 -0
- package/EntityManager.js +1736 -0
- package/LICENSE +21 -0
- package/MikroORM.d.ts +102 -0
- package/MikroORM.js +258 -0
- package/README.md +383 -0
- package/cache/CacheAdapter.d.ts +40 -0
- package/cache/CacheAdapter.js +2 -0
- package/cache/FileCacheAdapter.d.ts +31 -0
- package/cache/FileCacheAdapter.js +90 -0
- package/cache/GeneratedCacheAdapter.d.ts +25 -0
- package/cache/GeneratedCacheAdapter.js +38 -0
- package/cache/MemoryCacheAdapter.d.ts +24 -0
- package/cache/MemoryCacheAdapter.js +44 -0
- package/cache/NullCacheAdapter.d.ts +19 -0
- package/cache/NullCacheAdapter.js +30 -0
- package/cache/index.d.ts +5 -0
- package/cache/index.js +21 -0
- package/connections/Connection.d.ts +85 -0
- package/connections/Connection.js +128 -0
- package/connections/index.d.ts +1 -0
- package/connections/index.js +17 -0
- package/decorators/Check.d.ts +3 -0
- package/decorators/Check.js +17 -0
- package/decorators/CreateRequestContext.d.ts +2 -0
- package/decorators/CreateRequestContext.js +31 -0
- package/decorators/Embeddable.d.ts +8 -0
- package/decorators/Embeddable.js +15 -0
- package/decorators/Embedded.d.ts +13 -0
- package/decorators/Embedded.js +21 -0
- package/decorators/EnsureRequestContext.d.ts +2 -0
- package/decorators/EnsureRequestContext.js +26 -0
- package/decorators/Entity.d.ts +18 -0
- package/decorators/Entity.js +17 -0
- package/decorators/Enum.d.ts +9 -0
- package/decorators/Enum.js +20 -0
- package/decorators/Filter.d.ts +2 -0
- package/decorators/Filter.js +12 -0
- package/decorators/Formula.d.ts +5 -0
- package/decorators/Formula.js +19 -0
- package/decorators/Indexed.d.ts +12 -0
- package/decorators/Indexed.js +25 -0
- package/decorators/ManyToMany.d.ts +21 -0
- package/decorators/ManyToMany.js +17 -0
- package/decorators/ManyToOne.d.ts +15 -0
- package/decorators/ManyToOne.js +17 -0
- package/decorators/OneToMany.d.ts +18 -0
- package/decorators/OneToMany.js +21 -0
- package/decorators/OneToOne.d.ts +12 -0
- package/decorators/OneToOne.js +11 -0
- package/decorators/PrimaryKey.d.ts +8 -0
- package/decorators/PrimaryKey.js +24 -0
- package/decorators/Property.d.ts +218 -0
- package/decorators/Property.js +35 -0
- package/decorators/Subscriber.d.ts +1 -0
- package/decorators/Subscriber.js +2 -0
- package/decorators/hooks.d.ts +16 -0
- package/decorators/hooks.js +60 -0
- package/decorators/index.d.ts +17 -0
- package/decorators/index.js +36 -0
- package/drivers/DatabaseDriver.d.ts +72 -0
- package/drivers/DatabaseDriver.js +358 -0
- package/drivers/IDatabaseDriver.d.ts +193 -0
- package/drivers/IDatabaseDriver.js +4 -0
- package/drivers/index.d.ts +2 -0
- package/drivers/index.js +18 -0
- package/entity/ArrayCollection.d.ts +113 -0
- package/entity/ArrayCollection.js +386 -0
- package/entity/BaseEntity.d.ts +22 -0
- package/entity/BaseEntity.js +47 -0
- package/entity/Collection.d.ts +104 -0
- package/entity/Collection.js +373 -0
- package/entity/EntityAssigner.d.ts +28 -0
- package/entity/EntityAssigner.js +226 -0
- package/entity/EntityFactory.d.ts +41 -0
- package/entity/EntityFactory.js +302 -0
- package/entity/EntityHelper.d.ts +29 -0
- package/entity/EntityHelper.js +250 -0
- package/entity/EntityIdentifier.d.ts +10 -0
- package/entity/EntityIdentifier.js +19 -0
- package/entity/EntityLoader.d.ts +65 -0
- package/entity/EntityLoader.js +579 -0
- package/entity/EntityRepository.d.ts +161 -0
- package/entity/EntityRepository.js +207 -0
- package/entity/EntityValidator.d.ts +19 -0
- package/entity/EntityValidator.js +152 -0
- package/entity/Reference.d.ts +89 -0
- package/entity/Reference.js +242 -0
- package/entity/WrappedEntity.d.ts +67 -0
- package/entity/WrappedEntity.js +146 -0
- package/entity/index.d.ts +13 -0
- package/entity/index.js +29 -0
- package/entity/wrap.d.ts +15 -0
- package/entity/wrap.js +26 -0
- package/enums.d.ts +160 -0
- package/enums.js +169 -0
- package/errors.d.ts +65 -0
- package/errors.js +222 -0
- package/events/EventManager.d.ts +17 -0
- package/events/EventManager.js +77 -0
- package/events/EventSubscriber.d.ts +39 -0
- package/events/EventSubscriber.js +2 -0
- package/events/TransactionEventBroadcaster.d.ts +11 -0
- package/events/TransactionEventBroadcaster.js +17 -0
- package/events/index.d.ts +3 -0
- package/events/index.js +19 -0
- package/exceptions.d.ts +104 -0
- package/exceptions.js +130 -0
- package/hydration/Hydrator.d.ts +23 -0
- package/hydration/Hydrator.js +51 -0
- package/hydration/ObjectHydrator.d.ts +24 -0
- package/hydration/ObjectHydrator.js +332 -0
- package/hydration/index.d.ts +2 -0
- package/hydration/index.js +18 -0
- package/index.d.ts +25 -0
- package/index.js +50 -0
- package/index.mjs +192 -0
- package/logging/DefaultLogger.d.ts +32 -0
- package/logging/DefaultLogger.js +90 -0
- package/logging/Logger.d.ts +56 -0
- package/logging/Logger.js +2 -0
- package/logging/SimpleLogger.d.ts +17 -0
- package/logging/SimpleLogger.js +31 -0
- package/logging/colors.d.ts +9 -0
- package/logging/colors.js +20 -0
- package/logging/index.d.ts +4 -0
- package/logging/index.js +20 -0
- package/metadata/EntitySchema.d.ts +74 -0
- package/metadata/EntitySchema.js +293 -0
- package/metadata/MetadataDiscovery.d.ts +71 -0
- package/metadata/MetadataDiscovery.js +1244 -0
- package/metadata/MetadataProvider.d.ts +11 -0
- package/metadata/MetadataProvider.js +23 -0
- package/metadata/MetadataStorage.d.ts +22 -0
- package/metadata/MetadataStorage.js +87 -0
- package/metadata/MetadataValidator.d.ts +24 -0
- package/metadata/MetadataValidator.js +213 -0
- package/metadata/ReflectMetadataProvider.d.ts +8 -0
- package/metadata/ReflectMetadataProvider.js +48 -0
- package/metadata/index.d.ts +6 -0
- package/metadata/index.js +22 -0
- package/naming-strategy/AbstractNamingStrategy.d.ts +18 -0
- package/naming-strategy/AbstractNamingStrategy.js +48 -0
- package/naming-strategy/EntityCaseNamingStrategy.d.ts +12 -0
- package/naming-strategy/EntityCaseNamingStrategy.js +32 -0
- package/naming-strategy/MongoNamingStrategy.d.ts +9 -0
- package/naming-strategy/MongoNamingStrategy.js +25 -0
- package/naming-strategy/NamingStrategy.d.ts +52 -0
- package/naming-strategy/NamingStrategy.js +2 -0
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +10 -0
- package/naming-strategy/UnderscoreNamingStrategy.js +28 -0
- package/naming-strategy/index.d.ts +5 -0
- package/naming-strategy/index.js +21 -0
- package/package.json +70 -0
- package/platforms/ExceptionConverter.d.ts +5 -0
- package/platforms/ExceptionConverter.js +11 -0
- package/platforms/Platform.d.ts +201 -0
- package/platforms/Platform.js +452 -0
- package/platforms/index.d.ts +2 -0
- package/platforms/index.js +18 -0
- package/serialization/EntitySerializer.d.ts +34 -0
- package/serialization/EntitySerializer.js +206 -0
- package/serialization/EntityTransformer.d.ts +8 -0
- package/serialization/EntityTransformer.js +192 -0
- package/serialization/SerializationContext.d.ts +30 -0
- package/serialization/SerializationContext.js +111 -0
- package/serialization/index.d.ts +3 -0
- package/serialization/index.js +19 -0
- package/types/ArrayType.d.ts +13 -0
- package/types/ArrayType.js +47 -0
- package/types/BigIntType.d.ts +16 -0
- package/types/BigIntType.js +45 -0
- package/types/BlobType.d.ts +10 -0
- package/types/BlobType.js +27 -0
- package/types/BooleanType.d.ts +8 -0
- package/types/BooleanType.js +16 -0
- package/types/DateTimeType.d.ts +8 -0
- package/types/DateTimeType.js +16 -0
- package/types/DateType.d.ts +8 -0
- package/types/DateType.js +16 -0
- package/types/DecimalType.d.ts +11 -0
- package/types/DecimalType.js +22 -0
- package/types/DoubleType.d.ts +11 -0
- package/types/DoubleType.js +22 -0
- package/types/EnumArrayType.d.ts +9 -0
- package/types/EnumArrayType.js +32 -0
- package/types/EnumType.d.ts +8 -0
- package/types/EnumType.js +16 -0
- package/types/FloatType.d.ts +8 -0
- package/types/FloatType.js +16 -0
- package/types/IntegerType.d.ts +8 -0
- package/types/IntegerType.js +16 -0
- package/types/IntervalType.d.ts +8 -0
- package/types/IntervalType.js +16 -0
- package/types/JsonType.d.ts +13 -0
- package/types/JsonType.js +34 -0
- package/types/MediumIntType.d.ts +6 -0
- package/types/MediumIntType.js +10 -0
- package/types/SmallIntType.d.ts +8 -0
- package/types/SmallIntType.js +16 -0
- package/types/StringType.d.ts +8 -0
- package/types/StringType.js +16 -0
- package/types/TextType.d.ts +8 -0
- package/types/TextType.js +16 -0
- package/types/TimeType.d.ts +9 -0
- package/types/TimeType.js +23 -0
- package/types/TinyIntType.d.ts +8 -0
- package/types/TinyIntType.js +16 -0
- package/types/Type.d.ts +64 -0
- package/types/Type.js +84 -0
- package/types/Uint8ArrayType.d.ts +11 -0
- package/types/Uint8ArrayType.js +37 -0
- package/types/UnknownType.d.ts +7 -0
- package/types/UnknownType.js +13 -0
- package/types/UuidType.d.ts +7 -0
- package/types/UuidType.js +13 -0
- package/types/index.d.ts +75 -0
- package/types/index.js +77 -0
- package/typings.d.ts +767 -0
- package/typings.js +198 -0
- package/unit-of-work/ChangeSet.d.ts +34 -0
- package/unit-of-work/ChangeSet.js +62 -0
- package/unit-of-work/ChangeSetComputer.d.ts +26 -0
- package/unit-of-work/ChangeSetComputer.js +153 -0
- package/unit-of-work/ChangeSetPersister.d.ts +50 -0
- package/unit-of-work/ChangeSetPersister.js +361 -0
- package/unit-of-work/CommitOrderCalculator.d.ts +62 -0
- package/unit-of-work/CommitOrderCalculator.js +113 -0
- package/unit-of-work/IdentityMap.d.ts +17 -0
- package/unit-of-work/IdentityMap.js +84 -0
- package/unit-of-work/UnitOfWork.d.ts +124 -0
- package/unit-of-work/UnitOfWork.js +1013 -0
- package/unit-of-work/index.d.ts +6 -0
- package/unit-of-work/index.js +22 -0
- package/utils/AbstractSchemaGenerator.d.ts +38 -0
- package/utils/AbstractSchemaGenerator.js +101 -0
- package/utils/Configuration.d.ts +390 -0
- package/utils/Configuration.js +357 -0
- package/utils/ConfigurationLoader.d.ts +29 -0
- package/utils/ConfigurationLoader.js +282 -0
- package/utils/Cursor.d.ts +77 -0
- package/utils/Cursor.js +169 -0
- package/utils/DataloaderUtils.d.ts +43 -0
- package/utils/DataloaderUtils.js +194 -0
- package/utils/EntityComparator.d.ts +73 -0
- package/utils/EntityComparator.js +568 -0
- package/utils/NullHighlighter.d.ts +4 -0
- package/utils/NullHighlighter.js +9 -0
- package/utils/QueryHelper.d.ts +28 -0
- package/utils/QueryHelper.js +228 -0
- package/utils/RawQueryFragment.d.ts +96 -0
- package/utils/RawQueryFragment.js +188 -0
- package/utils/RequestContext.d.ts +34 -0
- package/utils/RequestContext.js +54 -0
- package/utils/TransactionContext.d.ts +19 -0
- package/utils/TransactionContext.js +34 -0
- package/utils/Utils.d.ts +274 -0
- package/utils/Utils.js +1073 -0
- package/utils/clone.d.ts +6 -0
- package/utils/clone.js +127 -0
- package/utils/index.d.ts +13 -0
- package/utils/index.js +29 -0
- package/utils/upsert-utils.d.ts +6 -0
- package/utils/upsert-utils.js +33 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SyncCacheAdapter } from './CacheAdapter';
|
|
2
|
+
export declare class NullCacheAdapter implements SyncCacheAdapter {
|
|
3
|
+
/**
|
|
4
|
+
* @inheritDoc
|
|
5
|
+
*/
|
|
6
|
+
get(name: string): any;
|
|
7
|
+
/**
|
|
8
|
+
* @inheritDoc
|
|
9
|
+
*/
|
|
10
|
+
set(name: string, data: any, origin: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
remove(name: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NullCacheAdapter = void 0;
|
|
4
|
+
class NullCacheAdapter {
|
|
5
|
+
/**
|
|
6
|
+
* @inheritDoc
|
|
7
|
+
*/
|
|
8
|
+
get(name) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
set(name, data, origin) {
|
|
15
|
+
// ignore
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
remove(name) {
|
|
21
|
+
// ignore
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
clear() {
|
|
27
|
+
// ignore
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.NullCacheAdapter = NullCacheAdapter;
|
package/cache/index.d.ts
ADDED
package/cache/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CacheAdapter"), exports);
|
|
18
|
+
__exportStar(require("./NullCacheAdapter"), exports);
|
|
19
|
+
__exportStar(require("./FileCacheAdapter"), exports);
|
|
20
|
+
__exportStar(require("./MemoryCacheAdapter"), exports);
|
|
21
|
+
__exportStar(require("./GeneratedCacheAdapter"), exports);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type Configuration, type ConnectionOptions, type DynamicPassword } from '../utils';
|
|
2
|
+
import type { LogContext, Logger } from '../logging';
|
|
3
|
+
import type { MetadataStorage } from '../metadata';
|
|
4
|
+
import type { ConnectionType, Dictionary, MaybePromise, Primary } from '../typings';
|
|
5
|
+
import type { Platform } from '../platforms/Platform';
|
|
6
|
+
import type { TransactionEventBroadcaster } from '../events/TransactionEventBroadcaster';
|
|
7
|
+
import type { IsolationLevel } from '../enums';
|
|
8
|
+
export declare abstract class Connection {
|
|
9
|
+
protected readonly config: Configuration;
|
|
10
|
+
protected readonly type: ConnectionType;
|
|
11
|
+
protected metadata: MetadataStorage;
|
|
12
|
+
protected platform: Platform;
|
|
13
|
+
protected readonly options: ConnectionOptions;
|
|
14
|
+
protected readonly logger: Logger;
|
|
15
|
+
protected connected: boolean;
|
|
16
|
+
constructor(config: Configuration, options?: ConnectionOptions, type?: ConnectionType);
|
|
17
|
+
/**
|
|
18
|
+
* Establishes connection to database
|
|
19
|
+
*/
|
|
20
|
+
abstract connect(): void | Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Are we connected to the database
|
|
23
|
+
*/
|
|
24
|
+
abstract isConnected(): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Are we connected to the database
|
|
27
|
+
*/
|
|
28
|
+
abstract checkConnection(): Promise<{
|
|
29
|
+
ok: boolean;
|
|
30
|
+
reason?: string;
|
|
31
|
+
error?: Error;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Closes the database connection (aka disconnect)
|
|
35
|
+
*/
|
|
36
|
+
close(force?: boolean): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()`
|
|
39
|
+
*/
|
|
40
|
+
ensureConnection(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb)
|
|
43
|
+
*/
|
|
44
|
+
abstract getDefaultClientUrl(): string;
|
|
45
|
+
transactional<T>(cb: (trx: Transaction) => Promise<T>, options?: {
|
|
46
|
+
isolationLevel?: IsolationLevel;
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
ctx?: Transaction;
|
|
49
|
+
eventBroadcaster?: TransactionEventBroadcaster;
|
|
50
|
+
}): Promise<T>;
|
|
51
|
+
begin(options?: {
|
|
52
|
+
isolationLevel?: IsolationLevel;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
ctx?: Transaction;
|
|
55
|
+
eventBroadcaster?: TransactionEventBroadcaster;
|
|
56
|
+
}): Promise<Transaction>;
|
|
57
|
+
commit(ctx: Transaction, eventBroadcaster?: TransactionEventBroadcaster): Promise<void>;
|
|
58
|
+
rollback(ctx: Transaction, eventBroadcaster?: TransactionEventBroadcaster): Promise<void>;
|
|
59
|
+
abstract execute<T>(query: string, params?: any[], method?: 'all' | 'get' | 'run', ctx?: Transaction): Promise<QueryResult<T> | any | any[]>;
|
|
60
|
+
getConnectionOptions(): ConnectionConfig;
|
|
61
|
+
getClientUrl(): string;
|
|
62
|
+
setMetadata(metadata: MetadataStorage): void;
|
|
63
|
+
setPlatform(platform: Platform): void;
|
|
64
|
+
getPlatform(): Platform;
|
|
65
|
+
protected executeQuery<T>(query: string, cb: () => Promise<T>, context?: LogContext): Promise<T>;
|
|
66
|
+
protected logQuery(query: string, context?: LogContext): void;
|
|
67
|
+
}
|
|
68
|
+
export interface QueryResult<T = {
|
|
69
|
+
id: number;
|
|
70
|
+
}> {
|
|
71
|
+
affectedRows: number;
|
|
72
|
+
insertId: Primary<T>;
|
|
73
|
+
row?: Dictionary;
|
|
74
|
+
rows?: Dictionary[];
|
|
75
|
+
insertedIds?: Primary<T>[];
|
|
76
|
+
}
|
|
77
|
+
export interface ConnectionConfig {
|
|
78
|
+
host?: string;
|
|
79
|
+
port?: number;
|
|
80
|
+
user?: string;
|
|
81
|
+
password?: string | (() => MaybePromise<string> | MaybePromise<DynamicPassword>);
|
|
82
|
+
database?: string;
|
|
83
|
+
schema?: string;
|
|
84
|
+
}
|
|
85
|
+
export type Transaction<T = any> = T;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Connection = void 0;
|
|
4
|
+
const url_1 = require("url");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class Connection {
|
|
7
|
+
config;
|
|
8
|
+
type;
|
|
9
|
+
metadata;
|
|
10
|
+
platform;
|
|
11
|
+
options;
|
|
12
|
+
logger;
|
|
13
|
+
connected = false;
|
|
14
|
+
constructor(config, options, type = 'write') {
|
|
15
|
+
this.config = config;
|
|
16
|
+
this.type = type;
|
|
17
|
+
this.logger = this.config.getLogger();
|
|
18
|
+
if (options) {
|
|
19
|
+
this.options = options;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const props = ['dbName', 'clientUrl', 'host', 'port', 'user', 'password', 'multipleStatements', 'pool', 'schema'];
|
|
23
|
+
this.options = props.reduce((o, i) => {
|
|
24
|
+
o[i] = this.config.get(i);
|
|
25
|
+
return o;
|
|
26
|
+
}, {});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Closes the database connection (aka disconnect)
|
|
31
|
+
*/
|
|
32
|
+
async close(force) {
|
|
33
|
+
Object.keys(this.options)
|
|
34
|
+
.filter(k => k !== 'name')
|
|
35
|
+
.forEach(k => delete this.options[k]);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()`
|
|
39
|
+
*/
|
|
40
|
+
async ensureConnection() {
|
|
41
|
+
if (!this.connected) {
|
|
42
|
+
await this.connect();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async transactional(cb, options) {
|
|
46
|
+
throw new Error(`Transactions are not supported by current driver`);
|
|
47
|
+
}
|
|
48
|
+
async begin(options) {
|
|
49
|
+
throw new Error(`Transactions are not supported by current driver`);
|
|
50
|
+
}
|
|
51
|
+
async commit(ctx, eventBroadcaster) {
|
|
52
|
+
throw new Error(`Transactions are not supported by current driver`);
|
|
53
|
+
}
|
|
54
|
+
async rollback(ctx, eventBroadcaster) {
|
|
55
|
+
throw new Error(`Transactions are not supported by current driver`);
|
|
56
|
+
}
|
|
57
|
+
getConnectionOptions() {
|
|
58
|
+
const ret = {};
|
|
59
|
+
if (this.options.clientUrl) {
|
|
60
|
+
const url = new url_1.URL(this.options.clientUrl);
|
|
61
|
+
this.options.host = ret.host = this.options.host ?? decodeURIComponent(url.hostname);
|
|
62
|
+
this.options.port = ret.port = this.options.port ?? +url.port;
|
|
63
|
+
this.options.user = ret.user = this.options.user ?? decodeURIComponent(url.username);
|
|
64
|
+
this.options.password = ret.password = this.options.password ?? decodeURIComponent(url.password);
|
|
65
|
+
this.options.dbName = ret.database = this.options.dbName ?? decodeURIComponent(url.pathname).replace(/^\//, '');
|
|
66
|
+
if (this.options.schema || url.searchParams.has('schema')) {
|
|
67
|
+
this.options.schema = ret.schema = this.options.schema ?? decodeURIComponent(url.searchParams.get('schema'));
|
|
68
|
+
this.config.set('schema', ret.schema);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const url = new url_1.URL(this.config.getClientUrl());
|
|
73
|
+
this.options.host = ret.host = this.options.host ?? this.config.get('host', decodeURIComponent(url.hostname));
|
|
74
|
+
this.options.port = ret.port = this.options.port ?? this.config.get('port', +url.port);
|
|
75
|
+
this.options.user = ret.user = this.options.user ?? this.config.get('user', decodeURIComponent(url.username));
|
|
76
|
+
this.options.password = ret.password = this.options.password ?? this.config.get('password', decodeURIComponent(url.password));
|
|
77
|
+
this.options.dbName = ret.database = this.options.dbName ?? this.config.get('dbName', decodeURIComponent(url.pathname).replace(/^\//, ''));
|
|
78
|
+
}
|
|
79
|
+
return ret;
|
|
80
|
+
}
|
|
81
|
+
getClientUrl() {
|
|
82
|
+
const options = this.getConnectionOptions();
|
|
83
|
+
const url = new url_1.URL(this.config.getClientUrl(true));
|
|
84
|
+
const password = options.password ? ':*****' : '';
|
|
85
|
+
const schema = options.schema && options.schema !== this.platform.getDefaultSchemaName()
|
|
86
|
+
? `?schema=${options.schema}`
|
|
87
|
+
: '';
|
|
88
|
+
return `${url.protocol}//${options.user}${password}@${options.host}:${options.port}${schema}`;
|
|
89
|
+
}
|
|
90
|
+
setMetadata(metadata) {
|
|
91
|
+
this.metadata = metadata;
|
|
92
|
+
}
|
|
93
|
+
setPlatform(platform) {
|
|
94
|
+
this.platform = platform;
|
|
95
|
+
}
|
|
96
|
+
getPlatform() {
|
|
97
|
+
return this.platform;
|
|
98
|
+
}
|
|
99
|
+
async executeQuery(query, cb, context) {
|
|
100
|
+
const now = Date.now();
|
|
101
|
+
try {
|
|
102
|
+
const res = await cb();
|
|
103
|
+
this.logQuery(query, {
|
|
104
|
+
...context,
|
|
105
|
+
took: Date.now() - now,
|
|
106
|
+
results: Array.isArray(res) ? res.length : undefined,
|
|
107
|
+
affected: utils_1.Utils.isPlainObject(res) ? res.affectedRows : undefined,
|
|
108
|
+
});
|
|
109
|
+
return res;
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
this.logQuery(query, { ...context, took: Date.now() - now, level: 'error' });
|
|
113
|
+
throw e;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
logQuery(query, context = {}) {
|
|
117
|
+
this.logger.logQuery({
|
|
118
|
+
level: 'info',
|
|
119
|
+
connection: {
|
|
120
|
+
type: this.type,
|
|
121
|
+
name: this.options.name || this.config.get('name') || this.options.host,
|
|
122
|
+
},
|
|
123
|
+
...context,
|
|
124
|
+
query,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.Connection = Connection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Connection';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Connection"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Check = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const Utils_1 = require("../utils/Utils");
|
|
6
|
+
function Check(options) {
|
|
7
|
+
return function (target, propertyName) {
|
|
8
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator((propertyName ? target.constructor : target));
|
|
9
|
+
options.property ??= propertyName;
|
|
10
|
+
meta.checks.push(options);
|
|
11
|
+
if (!propertyName) {
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
return Utils_1.Utils.propertyDecoratorReturnValue();
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.Check = Check;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateRequestContext = void 0;
|
|
4
|
+
const MikroORM_1 = require("../MikroORM");
|
|
5
|
+
const RequestContext_1 = require("../utils/RequestContext");
|
|
6
|
+
function CreateRequestContext(getContext) {
|
|
7
|
+
return function (target, propertyKey, descriptor) {
|
|
8
|
+
const originalMethod = descriptor.value;
|
|
9
|
+
descriptor.value = async function (...args) {
|
|
10
|
+
/* istanbul ignore next */
|
|
11
|
+
let orm;
|
|
12
|
+
if (typeof getContext === 'function') {
|
|
13
|
+
orm = await (getContext(this) ?? this.orm);
|
|
14
|
+
}
|
|
15
|
+
else if (getContext) {
|
|
16
|
+
orm = await getContext;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
orm = await this.orm;
|
|
20
|
+
}
|
|
21
|
+
if (!(orm instanceof MikroORM_1.MikroORM)) {
|
|
22
|
+
throw new Error('@CreateRequestContext() decorator can only be applied to methods of classes with `orm: MikroORM` property, or with a callback parameter like `@CreateRequestContext(() => orm)`');
|
|
23
|
+
}
|
|
24
|
+
return await RequestContext_1.RequestContext.create(orm.em, () => {
|
|
25
|
+
return originalMethod.apply(this, args);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return descriptor;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.CreateRequestContext = CreateRequestContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Dictionary } from '../typings';
|
|
2
|
+
export declare function Embeddable(options?: EmbeddableOptions): <T>(target: T & Dictionary) => T & Dictionary;
|
|
3
|
+
export type EmbeddableOptions = {
|
|
4
|
+
discriminatorColumn?: string;
|
|
5
|
+
discriminatorMap?: Dictionary<string>;
|
|
6
|
+
discriminatorValue?: number | string;
|
|
7
|
+
abstract?: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Embeddable = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
function Embeddable(options = {}) {
|
|
6
|
+
return function (target) {
|
|
7
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target);
|
|
8
|
+
meta.class = target;
|
|
9
|
+
meta.name = target.name;
|
|
10
|
+
meta.embeddable = true;
|
|
11
|
+
Object.assign(meta, options);
|
|
12
|
+
return target;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.Embeddable = Embeddable;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AnyEntity } from '../typings';
|
|
2
|
+
export declare function Embedded<T extends object>(type?: EmbeddedOptions | (() => AnyEntity), options?: EmbeddedOptions): (target: AnyEntity, propertyName: string) => any;
|
|
3
|
+
export type EmbeddedOptions = {
|
|
4
|
+
entity?: string | (() => AnyEntity | AnyEntity[]);
|
|
5
|
+
type?: string;
|
|
6
|
+
prefix?: string | boolean;
|
|
7
|
+
nullable?: boolean;
|
|
8
|
+
object?: boolean;
|
|
9
|
+
array?: boolean;
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
serializer?: (value: any) => any;
|
|
12
|
+
serializedName?: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Embedded = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
function Embedded(type = {}, options = {}) {
|
|
8
|
+
return function (target, propertyName) {
|
|
9
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target.constructor);
|
|
10
|
+
metadata_1.MetadataValidator.validateSingleDecorator(meta, propertyName, enums_1.ReferenceKind.EMBEDDED);
|
|
11
|
+
options = type instanceof Function ? { entity: type, ...options } : { ...type, ...options };
|
|
12
|
+
utils_1.Utils.defaultValue(options, 'prefix', true);
|
|
13
|
+
meta.properties[propertyName] = {
|
|
14
|
+
name: propertyName,
|
|
15
|
+
kind: enums_1.ReferenceKind.EMBEDDED,
|
|
16
|
+
...options,
|
|
17
|
+
};
|
|
18
|
+
return utils_1.Utils.propertyDecoratorReturnValue();
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.Embedded = Embedded;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnsureRequestContext = void 0;
|
|
4
|
+
const MikroORM_1 = require("../MikroORM");
|
|
5
|
+
const RequestContext_1 = require("../utils/RequestContext");
|
|
6
|
+
function EnsureRequestContext(getContext) {
|
|
7
|
+
return function (target, propertyKey, descriptor) {
|
|
8
|
+
const originalMethod = descriptor.value;
|
|
9
|
+
descriptor.value = async function (...args) {
|
|
10
|
+
// reuse existing context if available
|
|
11
|
+
if (RequestContext_1.RequestContext.currentRequestContext()) {
|
|
12
|
+
return originalMethod.apply(this, args);
|
|
13
|
+
}
|
|
14
|
+
/* istanbul ignore next */
|
|
15
|
+
const orm = getContext instanceof MikroORM_1.MikroORM ? getContext : (getContext?.(this) ?? this.orm);
|
|
16
|
+
if (!(orm instanceof MikroORM_1.MikroORM)) {
|
|
17
|
+
throw new Error('@EnsureRequestContext() decorator can only be applied to methods of classes with `orm: MikroORM` property, or with a callback parameter like `@EnsureRequestContext(() => orm)`');
|
|
18
|
+
}
|
|
19
|
+
return await RequestContext_1.RequestContext.create(orm.em, () => {
|
|
20
|
+
return originalMethod.apply(this, args);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return descriptor;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.EnsureRequestContext = EnsureRequestContext;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Constructor, Dictionary, FilterQuery } from '../typings';
|
|
2
|
+
import type { FindOptions } from '../drivers/IDatabaseDriver';
|
|
3
|
+
export declare function Entity(options?: EntityOptions<any>): <T>(target: T & Dictionary) => T & Dictionary;
|
|
4
|
+
export type EntityOptions<T> = {
|
|
5
|
+
tableName?: string;
|
|
6
|
+
schema?: string;
|
|
7
|
+
collection?: string;
|
|
8
|
+
discriminatorColumn?: string;
|
|
9
|
+
discriminatorMap?: Dictionary<string>;
|
|
10
|
+
discriminatorValue?: number | string;
|
|
11
|
+
forceConstructor?: boolean;
|
|
12
|
+
comment?: string;
|
|
13
|
+
abstract?: boolean;
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
virtual?: boolean;
|
|
16
|
+
expression?: string | ((em: any, where: FilterQuery<T>, options: FindOptions<T, any, any, any>) => object);
|
|
17
|
+
repository?: () => Constructor;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Entity = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function Entity(options = {}) {
|
|
7
|
+
return function (target) {
|
|
8
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target);
|
|
9
|
+
utils_1.Utils.mergeConfig(meta, options);
|
|
10
|
+
meta.class = target;
|
|
11
|
+
if (!options.abstract || meta.discriminatorColumn) {
|
|
12
|
+
meta.name = target.name;
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.Entity = Entity;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropertyOptions } from './Property';
|
|
2
|
+
import type { AnyEntity, Dictionary } from '../typings';
|
|
3
|
+
export declare function Enum<T extends object>(options?: EnumOptions<AnyEntity> | (() => Dictionary)): (target: AnyEntity, propertyName: string) => any;
|
|
4
|
+
export interface EnumOptions<T> extends PropertyOptions<T> {
|
|
5
|
+
items?: (number | string)[] | (() => Dictionary);
|
|
6
|
+
array?: boolean;
|
|
7
|
+
/** for postgres, by default it uses text column with check constraint */
|
|
8
|
+
nativeEnumName?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Enum = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const Utils_1 = require("../utils/Utils");
|
|
7
|
+
function Enum(options = {}) {
|
|
8
|
+
return function (target, propertyName) {
|
|
9
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target.constructor);
|
|
10
|
+
options = options instanceof Function ? { items: options } : options;
|
|
11
|
+
meta.properties[propertyName] = {
|
|
12
|
+
name: propertyName,
|
|
13
|
+
kind: enums_1.ReferenceKind.SCALAR,
|
|
14
|
+
enum: true,
|
|
15
|
+
...options,
|
|
16
|
+
};
|
|
17
|
+
return Utils_1.Utils.propertyDecoratorReturnValue();
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.Enum = Enum;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Filter = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
function Filter(options) {
|
|
6
|
+
return function (target) {
|
|
7
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target);
|
|
8
|
+
meta.filters[options.name] = options;
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.Filter = Filter;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AnyEntity } from '../typings';
|
|
2
|
+
import type { PropertyOptions } from './Property';
|
|
3
|
+
export declare function Formula<T extends object>(formula: string | ((alias: string) => string), options?: FormulaOptions<T>): (target: AnyEntity, propertyName: string) => any;
|
|
4
|
+
export interface FormulaOptions<T> extends PropertyOptions<T> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Formula = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const Utils_1 = require("../utils/Utils");
|
|
7
|
+
function Formula(formula, options = {}) {
|
|
8
|
+
return function (target, propertyName) {
|
|
9
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(target.constructor);
|
|
10
|
+
meta.properties[propertyName] = {
|
|
11
|
+
name: propertyName,
|
|
12
|
+
kind: enums_1.ReferenceKind.SCALAR,
|
|
13
|
+
formula,
|
|
14
|
+
...options,
|
|
15
|
+
};
|
|
16
|
+
return Utils_1.Utils.propertyDecoratorReturnValue();
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.Formula = Formula;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Dictionary } from '../typings';
|
|
2
|
+
export declare function Index<T>(options?: IndexOptions<T>): (target: Partial<any>, propertyName?: string | undefined) => any;
|
|
3
|
+
export declare function Unique<T>(options?: UniqueOptions<T>): (target: Partial<any>, propertyName?: string | undefined) => any;
|
|
4
|
+
export interface UniqueOptions<T> {
|
|
5
|
+
name?: string;
|
|
6
|
+
properties?: keyof T | (keyof T)[];
|
|
7
|
+
options?: Dictionary;
|
|
8
|
+
expression?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IndexOptions<T> extends UniqueOptions<T> {
|
|
11
|
+
type?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Unique = exports.Index = void 0;
|
|
4
|
+
const metadata_1 = require("../metadata");
|
|
5
|
+
const Utils_1 = require("../utils/Utils");
|
|
6
|
+
function createDecorator(options, unique) {
|
|
7
|
+
return function (target, propertyName) {
|
|
8
|
+
const meta = metadata_1.MetadataStorage.getMetadataFromDecorator(propertyName ? target.constructor : target);
|
|
9
|
+
options.properties = options.properties || propertyName;
|
|
10
|
+
const key = unique ? 'uniques' : 'indexes';
|
|
11
|
+
meta[key].push(options);
|
|
12
|
+
if (!propertyName) {
|
|
13
|
+
return target;
|
|
14
|
+
}
|
|
15
|
+
return Utils_1.Utils.propertyDecoratorReturnValue();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function Index(options = {}) {
|
|
19
|
+
return createDecorator(options, false);
|
|
20
|
+
}
|
|
21
|
+
exports.Index = Index;
|
|
22
|
+
function Unique(options = {}) {
|
|
23
|
+
return createDecorator(options, true);
|
|
24
|
+
}
|
|
25
|
+
exports.Unique = Unique;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReferenceOptions } from './Property';
|
|
2
|
+
import type { EntityName, AnyEntity, FilterQuery } from '../typings';
|
|
3
|
+
import { type QueryOrderMap } from '../enums';
|
|
4
|
+
export declare function ManyToMany<T extends object, O>(entity?: ManyToManyOptions<T, O> | string | (() => EntityName<T>), mappedBy?: (string & keyof T) | ((e: T) => any), options?: Partial<ManyToManyOptions<T, O>>): (target: AnyEntity, propertyName: string) => any;
|
|
5
|
+
export interface ManyToManyOptions<Owner, Target> extends ReferenceOptions<Owner, Target> {
|
|
6
|
+
owner?: boolean;
|
|
7
|
+
inversedBy?: (string & keyof Target) | ((e: Target) => any);
|
|
8
|
+
mappedBy?: (string & keyof Target) | ((e: Target) => any);
|
|
9
|
+
where?: FilterQuery<Target>;
|
|
10
|
+
orderBy?: QueryOrderMap<Target> | QueryOrderMap<Target>[];
|
|
11
|
+
fixedOrder?: boolean;
|
|
12
|
+
fixedOrderColumn?: string;
|
|
13
|
+
pivotTable?: string;
|
|
14
|
+
pivotEntity?: string | (() => EntityName<any>);
|
|
15
|
+
joinColumn?: string;
|
|
16
|
+
joinColumns?: string[];
|
|
17
|
+
inverseJoinColumn?: string;
|
|
18
|
+
inverseJoinColumns?: string[];
|
|
19
|
+
referenceColumnName?: string;
|
|
20
|
+
referencedColumnNames?: string[];
|
|
21
|
+
}
|