@mikro-orm/core 6.2.10-dev.8 → 6.2.10-dev.80
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 +1 -2
- package/EntityManager.js +26 -24
- package/decorators/Check.js +1 -2
- package/decorators/CreateRequestContext.js +2 -3
- package/decorators/Embeddable.js +1 -2
- package/decorators/Embedded.js +1 -2
- package/decorators/Entity.js +1 -2
- package/decorators/Enum.js +1 -2
- package/decorators/Filter.js +1 -2
- package/decorators/Formula.js +1 -2
- package/decorators/Indexed.d.ts +3 -3
- package/decorators/Indexed.js +2 -3
- package/decorators/ManyToMany.js +1 -2
- package/decorators/ManyToOne.js +1 -2
- package/decorators/OneToMany.js +2 -3
- package/decorators/OneToOne.d.ts +1 -1
- package/decorators/OneToOne.js +1 -2
- package/decorators/PrimaryKey.d.ts +3 -2
- package/decorators/PrimaryKey.js +2 -3
- package/decorators/Property.js +1 -2
- package/decorators/hooks.js +10 -11
- package/drivers/DatabaseDriver.js +1 -1
- package/drivers/IDatabaseDriver.d.ts +2 -1
- package/entity/ArrayCollection.d.ts +0 -1
- package/entity/EntityIdentifier.d.ts +1 -1
- package/entity/EntityLoader.js +3 -0
- package/entity/Reference.d.ts +0 -1
- package/entity/Reference.js +10 -7
- package/entity/WrappedEntity.d.ts +0 -1
- package/entity/wrap.js +2 -3
- package/events/TransactionEventBroadcaster.d.ts +2 -2
- package/index.mjs +1 -0
- package/metadata/MetadataDiscovery.js +6 -4
- package/naming-strategy/AbstractNamingStrategy.d.ts +8 -0
- package/naming-strategy/AbstractNamingStrategy.js +12 -0
- package/naming-strategy/NamingStrategy.d.ts +21 -0
- package/package.json +2 -2
- package/platforms/Platform.d.ts +5 -1
- package/platforms/Platform.js +12 -4
- package/serialization/EntitySerializer.js +2 -2
- package/serialization/SerializationContext.d.ts +2 -2
- package/types/BigIntType.d.ts +2 -2
- package/types/BigIntType.js +1 -1
- package/types/BlobType.d.ts +0 -1
- package/types/CharacterType.d.ts +7 -0
- package/types/CharacterType.js +13 -0
- package/types/DateTimeType.d.ts +1 -0
- package/types/DateTimeType.js +3 -0
- package/types/DateType.d.ts +1 -0
- package/types/DateType.js +3 -0
- package/types/DecimalType.d.ts +2 -2
- package/types/IntervalType.d.ts +1 -0
- package/types/IntervalType.js +3 -0
- package/types/StringType.d.ts +1 -0
- package/types/StringType.js +3 -0
- package/types/TimeType.d.ts +1 -0
- package/types/TimeType.js +3 -0
- package/types/Type.d.ts +16 -2
- package/types/Uint8ArrayType.d.ts +0 -1
- package/types/index.d.ts +19 -16
- package/types/index.js +34 -31
- package/typings.d.ts +18 -18
- package/unit-of-work/ChangeSet.d.ts +0 -1
- package/unit-of-work/ChangeSetPersister.d.ts +1 -1
- package/unit-of-work/ChangeSetPersister.js +5 -3
- package/unit-of-work/UnitOfWork.d.ts +1 -1
- package/unit-of-work/UnitOfWork.js +32 -18
- package/utils/Configuration.js +2 -2
- package/utils/ConfigurationLoader.js +1 -0
- package/utils/Cursor.d.ts +0 -1
- package/utils/DataloaderUtils.d.ts +3 -3
- package/utils/DataloaderUtils.js +4 -4
- package/utils/EntityComparator.d.ts +13 -0
- package/utils/EntityComparator.js +62 -34
- package/utils/RawQueryFragment.d.ts +1 -2
- package/utils/RawQueryFragment.js +4 -4
- package/utils/Utils.d.ts +4 -6
- package/utils/Utils.js +13 -10
- package/utils/clone.js +1 -2
- package/utils/upsert-utils.d.ts +3 -2
- package/utils/upsert-utils.js +4 -5
|
@@ -109,7 +109,7 @@ class MetadataDiscovery {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
filtered.forEach(meta => Object.values(meta.properties).forEach(prop => this.initIndexes(prop)));
|
|
112
|
+
filtered.forEach(meta => Object.values(meta.properties).forEach(prop => this.initIndexes(meta, prop)));
|
|
113
113
|
filtered.forEach(meta => this.autoWireBidirectionalProperties(meta));
|
|
114
114
|
filtered.forEach(meta => this.findReferencingProperties(meta, filtered));
|
|
115
115
|
for (const meta of filtered) {
|
|
@@ -1147,7 +1147,8 @@ class MetadataDiscovery {
|
|
|
1147
1147
|
&& !SCALAR_TYPES.includes(prop.type)
|
|
1148
1148
|
// or it might be inferred via ts-morph to some generic type alias
|
|
1149
1149
|
&& !prop.type.match(/[<>:"';{}]/)) {
|
|
1150
|
-
prop.
|
|
1150
|
+
const type = prop.length != null && !prop.type.endsWith(`(${prop.length})`) ? `${prop.type}(${prop.length})` : prop.type;
|
|
1151
|
+
prop.columnTypes = [type];
|
|
1151
1152
|
}
|
|
1152
1153
|
else {
|
|
1153
1154
|
prop.columnTypes = [mappedType.getColumnType(prop, this.platform)];
|
|
@@ -1204,8 +1205,9 @@ class MetadataDiscovery {
|
|
|
1204
1205
|
}
|
|
1205
1206
|
prop.unsigned ??= (prop.primary || prop.unsigned) && this.isNumericProperty(prop) && this.platform.supportsUnsigned();
|
|
1206
1207
|
}
|
|
1207
|
-
initIndexes(prop) {
|
|
1208
|
-
|
|
1208
|
+
initIndexes(meta, prop) {
|
|
1209
|
+
const hasIndex = meta.indexes.some(idx => idx.properties?.length === 1 && idx.properties[0] === prop.name);
|
|
1210
|
+
if (prop.kind === enums_1.ReferenceKind.MANY_TO_ONE && this.platform.indexForeignKeys() && !hasIndex) {
|
|
1209
1211
|
prop.index ??= true;
|
|
1210
1212
|
}
|
|
1211
1213
|
}
|
|
@@ -8,6 +8,14 @@ export declare abstract class AbstractNamingStrategy implements NamingStrategy {
|
|
|
8
8
|
*/
|
|
9
9
|
getEntityName(tableName: string, schemaName?: string): string;
|
|
10
10
|
columnNameToProperty(columnName: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
getEnumClassName(columnName: string, tableName: string, schemaName?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
enumValueToEnumProperty(enumValue: string, columnName: string, tableName: string, schemaName?: string): string;
|
|
11
19
|
aliasName(entityName: string, index: number): string;
|
|
12
20
|
abstract classToTableName(entityName: string): string;
|
|
13
21
|
abstract joinColumnName(propertyName: string): string;
|
|
@@ -47,6 +47,18 @@ class AbstractNamingStrategy {
|
|
|
47
47
|
}
|
|
48
48
|
return propName;
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @inheritDoc
|
|
52
|
+
*/
|
|
53
|
+
getEnumClassName(columnName, tableName, schemaName) {
|
|
54
|
+
return this.getEntityName(`${tableName}_${columnName}`, schemaName);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @inheritDoc
|
|
58
|
+
*/
|
|
59
|
+
enumValueToEnumProperty(enumValue, columnName, tableName, schemaName) {
|
|
60
|
+
return enumValue.toUpperCase();
|
|
61
|
+
}
|
|
50
62
|
aliasName(entityName, index) {
|
|
51
63
|
// Take only the first letter of the prefix to keep character counts down since some engines have character limits
|
|
52
64
|
return entityName.charAt(0).toLowerCase() + index;
|
|
@@ -15,6 +15,27 @@ export interface NamingStrategy {
|
|
|
15
15
|
* Return a column name for a property
|
|
16
16
|
*/
|
|
17
17
|
propertyToColumnName(propertyName: string, object?: boolean): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get an enum class name.
|
|
20
|
+
*
|
|
21
|
+
* @param columnName The column name which has the enum.
|
|
22
|
+
* @param tableName The table name of the column.
|
|
23
|
+
* @param schemaName The schema name of the column.
|
|
24
|
+
*
|
|
25
|
+
* @return A new class name that will be used for the enum.
|
|
26
|
+
*/
|
|
27
|
+
getEnumClassName(columnName: string, tableName: string, schemaName?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get an enum option name for a given enum value.
|
|
30
|
+
*
|
|
31
|
+
* @param enumValue The enum value to generate a name for.
|
|
32
|
+
* @param columnName The column name which has the enum.
|
|
33
|
+
* @param tableName The table name of the column.
|
|
34
|
+
* @param schemaName The schema name of the column.
|
|
35
|
+
*
|
|
36
|
+
* @return The name of the enum property that will hold the value.
|
|
37
|
+
*/
|
|
38
|
+
enumValueToEnumProperty(enumValue: string, columnName: string, tableName: string, schemaName?: string): string;
|
|
18
39
|
/**
|
|
19
40
|
* Return a name of the entity class based on database table name (used in `EntityGenerator`).
|
|
20
41
|
* Default implementation ignores the schema name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.80",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"esprima": "4.0.1",
|
|
65
65
|
"fs-extra": "11.2.0",
|
|
66
66
|
"globby": "11.1.0",
|
|
67
|
-
"mikro-orm": "6.2.10-dev.
|
|
67
|
+
"mikro-orm": "6.2.10-dev.80",
|
|
68
68
|
"reflect-metadata": "0.2.2"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/platforms/Platform.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export declare abstract class Platform {
|
|
|
58
58
|
length?: number;
|
|
59
59
|
}): string;
|
|
60
60
|
getDefaultDateTimeLength(): number;
|
|
61
|
+
getDefaultVarcharLength(): number;
|
|
62
|
+
getDefaultCharLength(): number;
|
|
61
63
|
getDateTypeDeclarationSQL(length?: number): string;
|
|
62
64
|
getTimeTypeDeclarationSQL(length?: number): string;
|
|
63
65
|
getRegExpOperator(val?: unknown, flags?: string): string;
|
|
@@ -69,7 +71,6 @@ export declare abstract class Platform {
|
|
|
69
71
|
quoteVersionValue(value: Date | number, prop: EntityProperty): Date | string | number;
|
|
70
72
|
getDefaultVersionLength(): number;
|
|
71
73
|
allowsComparingTuples(): boolean;
|
|
72
|
-
allowsUniqueBatchUpdates(): boolean;
|
|
73
74
|
isBigIntProperty(prop: EntityProperty): boolean;
|
|
74
75
|
isRaw(value: any): boolean;
|
|
75
76
|
getDefaultSchemaName(): string | undefined;
|
|
@@ -99,6 +100,9 @@ export declare abstract class Platform {
|
|
|
99
100
|
unsigned?: boolean;
|
|
100
101
|
autoincrement?: boolean;
|
|
101
102
|
}): string;
|
|
103
|
+
getCharTypeDeclarationSQL(column: {
|
|
104
|
+
length?: number;
|
|
105
|
+
}): string;
|
|
102
106
|
getVarcharTypeDeclarationSQL(column: {
|
|
103
107
|
length?: number;
|
|
104
108
|
}): string;
|
package/platforms/Platform.js
CHANGED
|
@@ -96,6 +96,12 @@ class Platform {
|
|
|
96
96
|
getDefaultDateTimeLength() {
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
|
+
getDefaultVarcharLength() {
|
|
100
|
+
return 255;
|
|
101
|
+
}
|
|
102
|
+
getDefaultCharLength() {
|
|
103
|
+
return 1;
|
|
104
|
+
}
|
|
99
105
|
getDateTypeDeclarationSQL(length) {
|
|
100
106
|
return 'date' + (length ? `(${length})` : '');
|
|
101
107
|
}
|
|
@@ -123,9 +129,6 @@ class Platform {
|
|
|
123
129
|
allowsComparingTuples() {
|
|
124
130
|
return true;
|
|
125
131
|
}
|
|
126
|
-
allowsUniqueBatchUpdates() {
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
132
|
isBigIntProperty(prop) {
|
|
130
133
|
return prop.columnTypes && prop.columnTypes[0] === 'bigint';
|
|
131
134
|
}
|
|
@@ -153,8 +156,11 @@ class Platform {
|
|
|
153
156
|
getBigIntTypeDeclarationSQL(column) {
|
|
154
157
|
return 'bigint';
|
|
155
158
|
}
|
|
159
|
+
getCharTypeDeclarationSQL(column) {
|
|
160
|
+
return `char(${column.length ?? this.getDefaultCharLength()})`;
|
|
161
|
+
}
|
|
156
162
|
getVarcharTypeDeclarationSQL(column) {
|
|
157
|
-
return `varchar(${column.length ??
|
|
163
|
+
return `varchar(${column.length ?? this.getDefaultVarcharLength()})`;
|
|
158
164
|
}
|
|
159
165
|
getIntervalTypeDeclarationSQL(column) {
|
|
160
166
|
return 'interval' + (column.length ? `(${column.length})` : '');
|
|
@@ -195,6 +201,8 @@ class Platform {
|
|
|
195
201
|
return types_1.Type.getType(types_1.ArrayType);
|
|
196
202
|
}
|
|
197
203
|
switch (this.extractSimpleType(type)) {
|
|
204
|
+
case 'character':
|
|
205
|
+
case 'char': return types_1.Type.getType(types_1.CharacterType);
|
|
198
206
|
case 'string':
|
|
199
207
|
case 'varchar': return types_1.Type.getType(types_1.StringType);
|
|
200
208
|
case 'interval': return types_1.Type.getType(types_1.IntervalType);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EntitySerializer = void 0;
|
|
4
|
+
exports.serialize = serialize;
|
|
4
5
|
const wrap_1 = require("../entity/wrap");
|
|
5
6
|
const Utils_1 = require("../utils/Utils");
|
|
6
7
|
const enums_1 = require("../enums");
|
|
@@ -210,4 +211,3 @@ function serialize(entities, options) {
|
|
|
210
211
|
}
|
|
211
212
|
return EntitySerializer.serialize(entities, options);
|
|
212
213
|
}
|
|
213
|
-
exports.serialize = serialize;
|
|
@@ -5,7 +5,7 @@ import type { Configuration } from '../utils/Configuration';
|
|
|
5
5
|
* Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that
|
|
6
6
|
* are defined in populate hint). If not, we proceed and call `leave` afterwards.
|
|
7
7
|
*/
|
|
8
|
-
export declare class SerializationContext<T> {
|
|
8
|
+
export declare class SerializationContext<T extends object> {
|
|
9
9
|
private readonly config;
|
|
10
10
|
private readonly populate;
|
|
11
11
|
private readonly fields?;
|
|
@@ -23,7 +23,7 @@ export declare class SerializationContext<T> {
|
|
|
23
23
|
/**
|
|
24
24
|
* When initializing new context, we need to propagate it to the whole entity graph recursively.
|
|
25
25
|
*/
|
|
26
|
-
static propagate(root: SerializationContext<
|
|
26
|
+
static propagate(root: SerializationContext<any>, entity: AnyEntity, isVisible: (meta: EntityMetadata, prop: string) => boolean): void;
|
|
27
27
|
isMarkedAsPopulated(entityName: string, prop: string): boolean;
|
|
28
28
|
isPartiallyLoaded(entityName: string, prop: string): boolean;
|
|
29
29
|
private register;
|
package/types/BigIntType.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import type { EntityProperty } from '../typings';
|
|
|
6
6
|
* or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`.
|
|
7
7
|
*/
|
|
8
8
|
export declare class BigIntType extends Type<string | bigint | number | null | undefined, string | null | undefined> {
|
|
9
|
-
mode?: "
|
|
10
|
-
constructor(mode?: "
|
|
9
|
+
mode?: ("bigint" | "number" | "string") | undefined;
|
|
10
|
+
constructor(mode?: ("bigint" | "number" | "string") | undefined);
|
|
11
11
|
convertToDatabaseValue(value: string | bigint | null | undefined): string | null | undefined;
|
|
12
12
|
convertToJSValue(value: string | bigint | null | undefined): bigint | number | string | null | undefined;
|
|
13
13
|
toJSON(value: string | bigint | null | undefined): string | bigint | null | undefined;
|
package/types/BigIntType.js
CHANGED
package/types/BlobType.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StringType } from './StringType';
|
|
2
|
+
import type { Platform } from '../platforms';
|
|
3
|
+
import type { EntityProperty } from '../typings';
|
|
4
|
+
export declare class CharacterType extends StringType {
|
|
5
|
+
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
|
+
getDefaultLength(platform: Platform): number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CharacterType = void 0;
|
|
4
|
+
const StringType_1 = require("./StringType");
|
|
5
|
+
class CharacterType extends StringType_1.StringType {
|
|
6
|
+
getColumnType(prop, platform) {
|
|
7
|
+
return platform.getCharTypeDeclarationSQL(prop);
|
|
8
|
+
}
|
|
9
|
+
getDefaultLength(platform) {
|
|
10
|
+
return platform.getDefaultCharLength();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CharacterType = CharacterType;
|
package/types/DateTimeType.d.ts
CHANGED
package/types/DateTimeType.js
CHANGED
package/types/DateType.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export declare class DateType extends Type<string | null | undefined, string | n
|
|
|
6
6
|
ensureComparable(): boolean;
|
|
7
7
|
convertToJSValue(value: any, platform: Platform): string | null | undefined;
|
|
8
8
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
9
|
+
getDefaultLength(platform: Platform): number;
|
|
9
10
|
}
|
package/types/DateType.js
CHANGED
package/types/DecimalType.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type { EntityProperty } from '../typings';
|
|
|
5
5
|
* Type that maps an SQL DECIMAL to a JS string or number.
|
|
6
6
|
*/
|
|
7
7
|
export declare class DecimalType extends Type<string | number, string> {
|
|
8
|
-
mode?: "
|
|
9
|
-
constructor(mode?: "
|
|
8
|
+
mode?: ("number" | "string") | undefined;
|
|
9
|
+
constructor(mode?: ("number" | "string") | undefined);
|
|
10
10
|
convertToJSValue(value: string): number | string;
|
|
11
11
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
12
12
|
compareAsType(): string;
|
package/types/IntervalType.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export declare class IntervalType extends Type<string | null | undefined, string
|
|
|
5
5
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
6
|
convertToJSValue(value: string | null | undefined, platform: Platform): string | null | undefined;
|
|
7
7
|
convertToDatabaseValue(value: string | null | undefined, platform: Platform): string | null | undefined;
|
|
8
|
+
getDefaultLength(platform: Platform): number;
|
|
8
9
|
}
|
package/types/IntervalType.js
CHANGED
|
@@ -12,5 +12,8 @@ class IntervalType extends Type_1.Type {
|
|
|
12
12
|
convertToDatabaseValue(value, platform) {
|
|
13
13
|
return platform.convertIntervalToDatabaseValue(value);
|
|
14
14
|
}
|
|
15
|
+
getDefaultLength(platform) {
|
|
16
|
+
return platform.getDefaultDateTimeLength();
|
|
17
|
+
}
|
|
15
18
|
}
|
|
16
19
|
exports.IntervalType = IntervalType;
|
package/types/StringType.d.ts
CHANGED
package/types/StringType.js
CHANGED
package/types/TimeType.d.ts
CHANGED
package/types/TimeType.js
CHANGED
package/types/Type.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { inspect } from 'util';
|
|
3
2
|
import type { Platform } from '../platforms';
|
|
4
3
|
import type { Constructor, EntityMetadata, EntityProperty } from '../typings';
|
|
@@ -59,7 +58,22 @@ export declare abstract class Type<JSType = string, DBType = JSType> {
|
|
|
59
58
|
* Gets the SQL declaration snippet for a field of this type.
|
|
60
59
|
*/
|
|
61
60
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
62
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Get the default length for values of this type
|
|
63
|
+
*
|
|
64
|
+
* When doing schema generation, if neither "length" nor "columnType" option is provided,
|
|
65
|
+
* the length will be defaulted to this value.
|
|
66
|
+
*
|
|
67
|
+
* When doing entity generation, if the type is recognized to this type, and the inferred length is this value,
|
|
68
|
+
* the length option will be omitted in the output. If this method is not defined, length is always outputted
|
|
69
|
+
* based on what is in the database metadata.
|
|
70
|
+
*
|
|
71
|
+
* @param platform The platform the default will be used for.
|
|
72
|
+
*
|
|
73
|
+
* @return The default value for the given platform.
|
|
74
|
+
*/
|
|
75
|
+
getDefaultLength?(platform: Platform): number;
|
|
76
|
+
static getType<JSType, DBType = JSType, TypeClass extends Constructor<Type<JSType, DBType>> = Constructor<Type<JSType, DBType>>>(cls: TypeClass): InstanceType<TypeClass>;
|
|
63
77
|
/**
|
|
64
78
|
* Checks whether the argument is instance of `Type`.
|
|
65
79
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DateType } from './DateType';
|
|
3
|
-
import { TimeType } from './TimeType';
|
|
4
|
-
import { DateTimeType } from './DateTimeType';
|
|
1
|
+
import { ArrayType } from './ArrayType';
|
|
5
2
|
import { BigIntType } from './BigIntType';
|
|
6
3
|
import { BlobType } from './BlobType';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { BooleanType } from './BooleanType';
|
|
5
|
+
import { DateTimeType } from './DateTimeType';
|
|
6
|
+
import { DateType } from './DateType';
|
|
7
|
+
import { DecimalType } from './DecimalType';
|
|
8
|
+
import { DoubleType } from './DoubleType';
|
|
9
9
|
import { EnumArrayType } from './EnumArrayType';
|
|
10
10
|
import { EnumType } from './EnumType';
|
|
11
|
-
import {
|
|
11
|
+
import { CharacterType } from './CharacterType';
|
|
12
|
+
import { FloatType } from './FloatType';
|
|
12
13
|
import { IntegerType } from './IntegerType';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { IntervalType } from './IntervalType';
|
|
15
|
+
import { JsonType } from './JsonType';
|
|
15
16
|
import { MediumIntType } from './MediumIntType';
|
|
16
|
-
import {
|
|
17
|
-
import { DoubleType } from './DoubleType';
|
|
18
|
-
import { BooleanType } from './BooleanType';
|
|
19
|
-
import { DecimalType } from './DecimalType';
|
|
17
|
+
import { SmallIntType } from './SmallIntType';
|
|
20
18
|
import { StringType } from './StringType';
|
|
21
|
-
import { UuidType } from './UuidType';
|
|
22
19
|
import { TextType } from './TextType';
|
|
23
|
-
import {
|
|
20
|
+
import { TimeType } from './TimeType';
|
|
21
|
+
import { TinyIntType } from './TinyIntType';
|
|
22
|
+
import { IType, TransformContext, Type } from './Type';
|
|
23
|
+
import { Uint8ArrayType } from './Uint8ArrayType';
|
|
24
24
|
import { UnknownType } from './UnknownType';
|
|
25
|
-
|
|
25
|
+
import { UuidType } from './UuidType';
|
|
26
|
+
export { Type, DateType, TimeType, DateTimeType, BigIntType, BlobType, Uint8ArrayType, ArrayType, EnumArrayType, EnumType, JsonType, IntegerType, SmallIntType, TinyIntType, MediumIntType, FloatType, DoubleType, BooleanType, DecimalType, StringType, UuidType, TextType, UnknownType, TransformContext, IntervalType, IType, CharacterType, };
|
|
26
27
|
export declare const types: {
|
|
27
28
|
readonly date: typeof DateType;
|
|
28
29
|
readonly time: typeof TimeType;
|
|
@@ -42,6 +43,7 @@ export declare const types: {
|
|
|
42
43
|
readonly double: typeof DoubleType;
|
|
43
44
|
readonly boolean: typeof BooleanType;
|
|
44
45
|
readonly decimal: typeof DecimalType;
|
|
46
|
+
readonly character: typeof CharacterType;
|
|
45
47
|
readonly string: typeof StringType;
|
|
46
48
|
readonly uuid: typeof UuidType;
|
|
47
49
|
readonly text: typeof TextType;
|
|
@@ -67,6 +69,7 @@ export declare const t: {
|
|
|
67
69
|
readonly double: typeof DoubleType;
|
|
68
70
|
readonly boolean: typeof BooleanType;
|
|
69
71
|
readonly decimal: typeof DecimalType;
|
|
72
|
+
readonly character: typeof CharacterType;
|
|
70
73
|
readonly string: typeof StringType;
|
|
71
74
|
readonly uuid: typeof UuidType;
|
|
72
75
|
readonly text: typeof TextType;
|
package/types/index.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.t = exports.types = exports.IntervalType = exports.UnknownType = exports.TextType = exports.UuidType = exports.StringType = exports.DecimalType = exports.BooleanType = exports.DoubleType = exports.FloatType = exports.MediumIntType = exports.TinyIntType = exports.SmallIntType = exports.IntegerType = exports.JsonType = exports.EnumType = exports.EnumArrayType = exports.ArrayType = exports.Uint8ArrayType = exports.BlobType = exports.BigIntType = exports.DateTimeType = exports.TimeType = exports.DateType = exports.Type = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
const DateType_1 = require("./DateType");
|
|
7
|
-
Object.defineProperty(exports, "DateType", { enumerable: true, get: function () { return DateType_1.DateType; } });
|
|
8
|
-
const TimeType_1 = require("./TimeType");
|
|
9
|
-
Object.defineProperty(exports, "TimeType", { enumerable: true, get: function () { return TimeType_1.TimeType; } });
|
|
10
|
-
const DateTimeType_1 = require("./DateTimeType");
|
|
11
|
-
Object.defineProperty(exports, "DateTimeType", { enumerable: true, get: function () { return DateTimeType_1.DateTimeType; } });
|
|
3
|
+
exports.t = exports.types = exports.CharacterType = exports.IntervalType = exports.UnknownType = exports.TextType = exports.UuidType = exports.StringType = exports.DecimalType = exports.BooleanType = exports.DoubleType = exports.FloatType = exports.MediumIntType = exports.TinyIntType = exports.SmallIntType = exports.IntegerType = exports.JsonType = exports.EnumType = exports.EnumArrayType = exports.ArrayType = exports.Uint8ArrayType = exports.BlobType = exports.BigIntType = exports.DateTimeType = exports.TimeType = exports.DateType = exports.Type = void 0;
|
|
4
|
+
const ArrayType_1 = require("./ArrayType");
|
|
5
|
+
Object.defineProperty(exports, "ArrayType", { enumerable: true, get: function () { return ArrayType_1.ArrayType; } });
|
|
12
6
|
const BigIntType_1 = require("./BigIntType");
|
|
13
7
|
Object.defineProperty(exports, "BigIntType", { enumerable: true, get: function () { return BigIntType_1.BigIntType; } });
|
|
14
8
|
const BlobType_1 = require("./BlobType");
|
|
15
9
|
Object.defineProperty(exports, "BlobType", { enumerable: true, get: function () { return BlobType_1.BlobType; } });
|
|
16
|
-
const
|
|
17
|
-
Object.defineProperty(exports, "
|
|
18
|
-
const
|
|
19
|
-
Object.defineProperty(exports, "
|
|
10
|
+
const BooleanType_1 = require("./BooleanType");
|
|
11
|
+
Object.defineProperty(exports, "BooleanType", { enumerable: true, get: function () { return BooleanType_1.BooleanType; } });
|
|
12
|
+
const DateTimeType_1 = require("./DateTimeType");
|
|
13
|
+
Object.defineProperty(exports, "DateTimeType", { enumerable: true, get: function () { return DateTimeType_1.DateTimeType; } });
|
|
14
|
+
const DateType_1 = require("./DateType");
|
|
15
|
+
Object.defineProperty(exports, "DateType", { enumerable: true, get: function () { return DateType_1.DateType; } });
|
|
16
|
+
const DecimalType_1 = require("./DecimalType");
|
|
17
|
+
Object.defineProperty(exports, "DecimalType", { enumerable: true, get: function () { return DecimalType_1.DecimalType; } });
|
|
18
|
+
const DoubleType_1 = require("./DoubleType");
|
|
19
|
+
Object.defineProperty(exports, "DoubleType", { enumerable: true, get: function () { return DoubleType_1.DoubleType; } });
|
|
20
20
|
const EnumArrayType_1 = require("./EnumArrayType");
|
|
21
21
|
Object.defineProperty(exports, "EnumArrayType", { enumerable: true, get: function () { return EnumArrayType_1.EnumArrayType; } });
|
|
22
22
|
const EnumType_1 = require("./EnumType");
|
|
23
23
|
Object.defineProperty(exports, "EnumType", { enumerable: true, get: function () { return EnumType_1.EnumType; } });
|
|
24
|
-
const
|
|
25
|
-
Object.defineProperty(exports, "
|
|
24
|
+
const CharacterType_1 = require("./CharacterType");
|
|
25
|
+
Object.defineProperty(exports, "CharacterType", { enumerable: true, get: function () { return CharacterType_1.CharacterType; } });
|
|
26
|
+
const FloatType_1 = require("./FloatType");
|
|
27
|
+
Object.defineProperty(exports, "FloatType", { enumerable: true, get: function () { return FloatType_1.FloatType; } });
|
|
26
28
|
const IntegerType_1 = require("./IntegerType");
|
|
27
29
|
Object.defineProperty(exports, "IntegerType", { enumerable: true, get: function () { return IntegerType_1.IntegerType; } });
|
|
28
|
-
const
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
const
|
|
31
|
-
Object.defineProperty(exports, "
|
|
30
|
+
const IntervalType_1 = require("./IntervalType");
|
|
31
|
+
Object.defineProperty(exports, "IntervalType", { enumerable: true, get: function () { return IntervalType_1.IntervalType; } });
|
|
32
|
+
const JsonType_1 = require("./JsonType");
|
|
33
|
+
Object.defineProperty(exports, "JsonType", { enumerable: true, get: function () { return JsonType_1.JsonType; } });
|
|
32
34
|
const MediumIntType_1 = require("./MediumIntType");
|
|
33
35
|
Object.defineProperty(exports, "MediumIntType", { enumerable: true, get: function () { return MediumIntType_1.MediumIntType; } });
|
|
34
|
-
const
|
|
35
|
-
Object.defineProperty(exports, "
|
|
36
|
-
const DoubleType_1 = require("./DoubleType");
|
|
37
|
-
Object.defineProperty(exports, "DoubleType", { enumerable: true, get: function () { return DoubleType_1.DoubleType; } });
|
|
38
|
-
const BooleanType_1 = require("./BooleanType");
|
|
39
|
-
Object.defineProperty(exports, "BooleanType", { enumerable: true, get: function () { return BooleanType_1.BooleanType; } });
|
|
40
|
-
const DecimalType_1 = require("./DecimalType");
|
|
41
|
-
Object.defineProperty(exports, "DecimalType", { enumerable: true, get: function () { return DecimalType_1.DecimalType; } });
|
|
36
|
+
const SmallIntType_1 = require("./SmallIntType");
|
|
37
|
+
Object.defineProperty(exports, "SmallIntType", { enumerable: true, get: function () { return SmallIntType_1.SmallIntType; } });
|
|
42
38
|
const StringType_1 = require("./StringType");
|
|
43
39
|
Object.defineProperty(exports, "StringType", { enumerable: true, get: function () { return StringType_1.StringType; } });
|
|
44
|
-
const UuidType_1 = require("./UuidType");
|
|
45
|
-
Object.defineProperty(exports, "UuidType", { enumerable: true, get: function () { return UuidType_1.UuidType; } });
|
|
46
40
|
const TextType_1 = require("./TextType");
|
|
47
41
|
Object.defineProperty(exports, "TextType", { enumerable: true, get: function () { return TextType_1.TextType; } });
|
|
48
|
-
const
|
|
49
|
-
Object.defineProperty(exports, "
|
|
42
|
+
const TimeType_1 = require("./TimeType");
|
|
43
|
+
Object.defineProperty(exports, "TimeType", { enumerable: true, get: function () { return TimeType_1.TimeType; } });
|
|
44
|
+
const TinyIntType_1 = require("./TinyIntType");
|
|
45
|
+
Object.defineProperty(exports, "TinyIntType", { enumerable: true, get: function () { return TinyIntType_1.TinyIntType; } });
|
|
46
|
+
const Type_1 = require("./Type");
|
|
47
|
+
Object.defineProperty(exports, "Type", { enumerable: true, get: function () { return Type_1.Type; } });
|
|
48
|
+
const Uint8ArrayType_1 = require("./Uint8ArrayType");
|
|
49
|
+
Object.defineProperty(exports, "Uint8ArrayType", { enumerable: true, get: function () { return Uint8ArrayType_1.Uint8ArrayType; } });
|
|
50
50
|
const UnknownType_1 = require("./UnknownType");
|
|
51
51
|
Object.defineProperty(exports, "UnknownType", { enumerable: true, get: function () { return UnknownType_1.UnknownType; } });
|
|
52
|
+
const UuidType_1 = require("./UuidType");
|
|
53
|
+
Object.defineProperty(exports, "UuidType", { enumerable: true, get: function () { return UuidType_1.UuidType; } });
|
|
52
54
|
exports.types = {
|
|
53
55
|
date: DateType_1.DateType,
|
|
54
56
|
time: TimeType_1.TimeType,
|
|
@@ -68,6 +70,7 @@ exports.types = {
|
|
|
68
70
|
double: DoubleType_1.DoubleType,
|
|
69
71
|
boolean: BooleanType_1.BooleanType,
|
|
70
72
|
decimal: DecimalType_1.DecimalType,
|
|
73
|
+
character: CharacterType_1.CharacterType,
|
|
71
74
|
string: StringType_1.StringType,
|
|
72
75
|
uuid: UuidType_1.UuidType,
|
|
73
76
|
text: TextType_1.TextType,
|