@mikro-orm/core 7.0.2-dev.12 → 7.0.2-dev.14
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 +4 -0
- package/EntityManager.js +4 -0
- package/MikroORM.d.ts +2 -0
- package/MikroORM.js +2 -0
- package/cache/CacheAdapter.d.ts +2 -0
- package/cache/GeneratedCacheAdapter.d.ts +1 -0
- package/cache/GeneratedCacheAdapter.js +1 -0
- package/cache/MemoryCacheAdapter.d.ts +1 -0
- package/cache/MemoryCacheAdapter.js +1 -0
- package/cache/NullCacheAdapter.d.ts +1 -0
- package/cache/NullCacheAdapter.js +1 -0
- package/connections/Connection.d.ts +13 -0
- package/connections/Connection.js +9 -0
- package/drivers/DatabaseDriver.d.ts +12 -0
- package/drivers/DatabaseDriver.js +12 -0
- package/drivers/IDatabaseDriver.d.ts +44 -0
- package/drivers/IDatabaseDriver.js +1 -0
- package/entity/BaseEntity.d.ts +11 -0
- package/entity/BaseEntity.js +11 -0
- package/entity/Collection.d.ts +26 -0
- package/entity/Collection.js +15 -0
- package/entity/EntityAssigner.d.ts +3 -0
- package/entity/EntityAssigner.js +2 -0
- package/entity/EntityFactory.d.ts +16 -0
- package/entity/EntityFactory.js +6 -0
- package/entity/EntityLoader.d.ts +19 -0
- package/entity/EntityLoader.js +2 -0
- package/entity/EntityRepository.d.ts +2 -0
- package/entity/EntityRepository.js +2 -0
- package/entity/Reference.d.ts +20 -0
- package/entity/Reference.js +16 -0
- package/entity/WrappedEntity.d.ts +20 -0
- package/entity/WrappedEntity.js +21 -1
- package/entity/defineEntity.d.ts +10 -0
- package/entity/defineEntity.js +1 -0
- package/enums.d.ts +132 -0
- package/enums.js +132 -0
- package/errors.d.ts +6 -0
- package/errors.js +6 -0
- package/events/EventManager.d.ts +5 -0
- package/events/EventManager.js +5 -0
- package/events/EventSubscriber.d.ts +4 -0
- package/events/TransactionEventBroadcaster.d.ts +2 -0
- package/events/TransactionEventBroadcaster.js +2 -0
- package/hydration/Hydrator.d.ts +2 -0
- package/hydration/Hydrator.js +2 -0
- package/hydration/ObjectHydrator.d.ts +1 -0
- package/hydration/ObjectHydrator.js +1 -0
- package/logging/DefaultLogger.d.ts +3 -0
- package/logging/DefaultLogger.js +3 -0
- package/logging/Logger.d.ts +5 -0
- package/metadata/EntitySchema.d.ts +22 -0
- package/metadata/EntitySchema.js +20 -0
- package/metadata/MetadataDiscovery.d.ts +4 -0
- package/metadata/MetadataDiscovery.js +4 -0
- package/metadata/MetadataProvider.d.ts +8 -0
- package/metadata/MetadataProvider.js +8 -0
- package/metadata/MetadataStorage.d.ts +14 -0
- package/metadata/MetadataStorage.js +13 -0
- package/naming-strategy/AbstractNamingStrategy.d.ts +1 -0
- package/naming-strategy/AbstractNamingStrategy.js +1 -0
- package/naming-strategy/MongoNamingStrategy.d.ts +1 -0
- package/naming-strategy/MongoNamingStrategy.js +1 -0
- package/naming-strategy/UnderscoreNamingStrategy.d.ts +1 -0
- package/naming-strategy/UnderscoreNamingStrategy.js +1 -0
- package/package.json +1 -1
- package/platforms/ExceptionConverter.d.ts +1 -0
- package/platforms/ExceptionConverter.js +1 -0
- package/platforms/Platform.d.ts +65 -0
- package/platforms/Platform.js +65 -0
- package/serialization/EntitySerializer.d.ts +2 -0
- package/serialization/EntitySerializer.js +2 -0
- package/serialization/EntityTransformer.d.ts +2 -0
- package/serialization/EntityTransformer.js +2 -0
- package/serialization/SerializationContext.d.ts +5 -0
- package/serialization/SerializationContext.js +5 -0
- package/types/ArrayType.d.ts +1 -0
- package/types/ArrayType.js +1 -0
- package/types/BlobType.d.ts +1 -0
- package/types/BlobType.js +1 -0
- package/types/BooleanType.d.ts +1 -0
- package/types/BooleanType.js +1 -0
- package/types/CharacterType.d.ts +1 -0
- package/types/CharacterType.js +1 -0
- package/types/DateTimeType.d.ts +1 -0
- package/types/DateTimeType.js +1 -0
- package/types/DateType.d.ts +1 -0
- package/types/DateType.js +1 -0
- package/types/EnumArrayType.d.ts +1 -0
- package/types/EnumArrayType.js +1 -0
- package/types/EnumType.d.ts +1 -0
- package/types/EnumType.js +1 -0
- package/types/FloatType.d.ts +1 -0
- package/types/FloatType.js +1 -0
- package/types/IntegerType.d.ts +1 -0
- package/types/IntegerType.js +1 -0
- package/types/IntervalType.d.ts +1 -0
- package/types/IntervalType.js +1 -0
- package/types/JsonType.d.ts +1 -0
- package/types/JsonType.js +1 -0
- package/types/MediumIntType.d.ts +1 -0
- package/types/MediumIntType.js +1 -0
- package/types/SmallIntType.d.ts +1 -0
- package/types/SmallIntType.js +1 -0
- package/types/StringType.d.ts +1 -0
- package/types/StringType.js +1 -0
- package/types/TextType.d.ts +1 -0
- package/types/TextType.js +1 -0
- package/types/TimeType.d.ts +1 -0
- package/types/TimeType.js +1 -0
- package/types/TinyIntType.d.ts +1 -0
- package/types/TinyIntType.js +1 -0
- package/types/Type.d.ts +3 -0
- package/types/Type.js +1 -0
- package/types/Uint8ArrayType.d.ts +1 -0
- package/types/Uint8ArrayType.js +1 -0
- package/types/UnknownType.d.ts +1 -0
- package/types/UnknownType.js +1 -0
- package/types/UuidType.d.ts +1 -0
- package/types/UuidType.js +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.js +2 -0
- package/typings.d.ts +177 -0
- package/typings.js +11 -0
- package/unit-of-work/ChangeSet.d.ts +4 -0
- package/unit-of-work/ChangeSet.js +4 -0
- package/unit-of-work/ChangeSetComputer.d.ts +2 -0
- package/unit-of-work/ChangeSetComputer.js +2 -0
- package/unit-of-work/ChangeSetPersister.d.ts +4 -0
- package/unit-of-work/ChangeSetPersister.js +4 -0
- package/unit-of-work/IdentityMap.d.ts +7 -0
- package/unit-of-work/IdentityMap.js +7 -0
- package/unit-of-work/UnitOfWork.d.ts +15 -0
- package/unit-of-work/UnitOfWork.js +15 -0
- package/utils/Configuration.d.ts +8 -0
- package/utils/Configuration.js +8 -0
- package/utils/EntityComparator.d.ts +2 -0
- package/utils/EntityComparator.js +2 -0
- package/utils/NullHighlighter.d.ts +1 -0
- package/utils/NullHighlighter.js +1 -0
- package/utils/RawQueryFragment.d.ts +10 -0
- package/utils/RawQueryFragment.js +9 -0
- package/utils/RequestContext.d.ts +1 -0
- package/utils/TransactionContext.d.ts +1 -0
- package/utils/TransactionContext.js +1 -0
- package/utils/Utils.d.ts +6 -0
- package/utils/Utils.js +7 -1
package/types/BlobType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database BLOB/BYTEA column to a Node.js `Buffer`. */
|
|
4
5
|
export declare class BlobType extends Uint8ArrayType {
|
|
5
6
|
convertToJSValue(value: Buffer): Buffer | null;
|
|
6
7
|
compareAsType(): string;
|
package/types/BlobType.js
CHANGED
package/types/BooleanType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database BOOLEAN/TINYINT(1) column to a JS `boolean`. */
|
|
4
5
|
export declare class BooleanType extends Type<boolean | null | undefined, boolean | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/BooleanType.js
CHANGED
package/types/CharacterType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StringType } from './StringType.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database CHAR (fixed-length) column to a JS `string`. */
|
|
4
5
|
export declare class CharacterType extends StringType {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
getDefaultLength(platform: Platform): number;
|
package/types/CharacterType.js
CHANGED
package/types/DateTimeType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database DATETIME/TIMESTAMP column to a JS `Date` object. */
|
|
4
5
|
export declare class DateTimeType extends Type<Date, string> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/DateTimeType.js
CHANGED
package/types/DateType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database DATE column (date without time) to a JS `string` in YYYY-MM-DD format. */
|
|
4
5
|
export declare class DateType extends Type<string | null | undefined, string | null | undefined> {
|
|
5
6
|
compareAsType(): string;
|
|
6
7
|
ensureComparable(): boolean;
|
package/types/DateType.js
CHANGED
package/types/EnumArrayType.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ArrayType } from './ArrayType.js';
|
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { TransformContext } from './Type.js';
|
|
4
4
|
import type { EntityProperty } from '../typings.js';
|
|
5
|
+
/** Maps a database array column to a JS array of enum values, with validation against allowed enum items. */
|
|
5
6
|
export declare class EnumArrayType<T extends string | number = string> extends ArrayType<T> {
|
|
6
7
|
private readonly owner;
|
|
7
8
|
private readonly items?;
|
package/types/EnumArrayType.js
CHANGED
package/types/EnumType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database ENUM or equivalent column to a JS string. Supports native database enums when available. */
|
|
4
5
|
export declare class EnumType extends Type<string | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/EnumType.js
CHANGED
package/types/FloatType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database FLOAT column to a JS `number`. */
|
|
4
5
|
export declare class FloatType extends Type<number | null | undefined, number | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/FloatType.js
CHANGED
package/types/IntegerType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database INTEGER/INT column to a JS `number`. */
|
|
4
5
|
export declare class IntegerType extends Type<number | null | undefined, number | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/IntegerType.js
CHANGED
package/types/IntervalType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database INTERVAL column (PostgreSQL) to a JS `string`. */
|
|
4
5
|
export declare class IntervalType extends Type<string | null | undefined, string | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
convertToJSValue(value: string | null | undefined, platform: Platform): string | null | undefined;
|
package/types/IntervalType.js
CHANGED
package/types/JsonType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type, type TransformContext } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityMetadata, EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database JSON/JSONB column to a JS object, handling serialization and deserialization. */
|
|
4
5
|
export declare class JsonType extends Type<unknown, string | null> {
|
|
5
6
|
convertToDatabaseValue(value: unknown, platform: Platform, context?: TransformContext): string | null;
|
|
6
7
|
convertToJSValueSQL(key: string, platform: Platform): string;
|
package/types/JsonType.js
CHANGED
package/types/MediumIntType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Platform } from '../platforms/Platform.js';
|
|
2
2
|
import type { EntityProperty } from '../typings.js';
|
|
3
3
|
import { IntegerType } from './IntegerType.js';
|
|
4
|
+
/** Maps a database MEDIUMINT column to a JS `number`. */
|
|
4
5
|
export declare class MediumIntType extends IntegerType {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
}
|
package/types/MediumIntType.js
CHANGED
package/types/SmallIntType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database SMALLINT column to a JS `number`. */
|
|
4
5
|
export declare class SmallIntType extends Type<number | null | undefined, number | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/SmallIntType.js
CHANGED
package/types/StringType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database VARCHAR column to a JS `string`. */
|
|
4
5
|
export declare class StringType extends Type<string | null | undefined, string | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/StringType.js
CHANGED
package/types/TextType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database TEXT column (unbounded length) to a JS `string`. */
|
|
4
5
|
export declare class TextType extends Type<string | null | undefined, string | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/TextType.js
CHANGED
package/types/TimeType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database TIME column to a JS `string` in HH:MM:SS format. */
|
|
4
5
|
export declare class TimeType extends Type {
|
|
5
6
|
convertToDatabaseValue(value: any, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/TimeType.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import { ValidationError } from '../errors.js';
|
|
3
|
+
/** Maps a database TIME column to a JS `string` in HH:MM:SS format. */
|
|
3
4
|
export class TimeType extends Type {
|
|
4
5
|
convertToDatabaseValue(value, platform) {
|
|
5
6
|
if (value && !value.toString().match(/^\d{2,}:(?:[0-5]\d):(?:[0-5]\d)$/)) {
|
package/types/TinyIntType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database TINYINT column to a JS `number`. */
|
|
4
5
|
export declare class TinyIntType extends Type<number | null | undefined, number | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/TinyIntType.js
CHANGED
package/types/Type.d.ts
CHANGED
|
@@ -2,17 +2,20 @@ import type { Platform } from '../platforms/Platform.js';
|
|
|
2
2
|
import type { Constructor, EntityMetadata, EntityProperty } from '../typings.js';
|
|
3
3
|
/** @internal */
|
|
4
4
|
export declare const ORM_TYPE: unique symbol;
|
|
5
|
+
/** Context passed to type conversion methods, indicating the conversion mode and source. */
|
|
5
6
|
export interface TransformContext {
|
|
6
7
|
fromQuery?: boolean;
|
|
7
8
|
force?: boolean;
|
|
8
9
|
key?: string;
|
|
9
10
|
mode?: 'hydration' | 'query' | 'query-data' | 'discovery' | 'serialization';
|
|
10
11
|
}
|
|
12
|
+
/** Branded type helper for mapping between JS runtime, database raw, and JSON serialized representations. */
|
|
11
13
|
export type IType<Runtime, Raw, Serialized = Raw> = Runtime & {
|
|
12
14
|
__raw?: Raw;
|
|
13
15
|
__runtime?: Runtime;
|
|
14
16
|
__serialized?: Serialized;
|
|
15
17
|
};
|
|
18
|
+
/** Abstract base class for custom property types that handle conversion between JS and database representations. */
|
|
16
19
|
export declare abstract class Type<JSType = string, DBType = JSType> {
|
|
17
20
|
private static readonly types;
|
|
18
21
|
platform?: Platform;
|
package/types/Type.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { inspect } from '../logging/inspect.js';
|
|
2
2
|
/** @internal */
|
|
3
3
|
export const ORM_TYPE = Symbol.for('@mikro-orm/type');
|
|
4
|
+
/** Abstract base class for custom property types that handle conversion between JS and database representations. */
|
|
4
5
|
export class Type {
|
|
5
6
|
static types = new Map();
|
|
6
7
|
platform;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database BLOB/BYTEA column to a JS `Uint8Array`. */
|
|
4
5
|
export declare class Uint8ArrayType extends Type<Uint8Array | null> {
|
|
5
6
|
convertToDatabaseValue(value: Uint8Array): Buffer;
|
|
6
7
|
convertToJSValue(value: Buffer): Uint8Array | null;
|
package/types/Uint8ArrayType.js
CHANGED
package/types/UnknownType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EntityProperty } from '../typings.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import { Type } from './Type.js';
|
|
4
|
+
/** Passthrough type that performs no conversion, used when the column type is unknown or unrecognized. */
|
|
4
5
|
export declare class UnknownType extends Type<unknown | null | undefined, unknown | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
get runtimeType(): string;
|
package/types/UnknownType.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
|
+
/** Passthrough type that performs no conversion, used when the column type is unknown or unrecognized. */
|
|
2
3
|
export class UnknownType extends Type {
|
|
3
4
|
getColumnType(prop, platform) {
|
|
4
5
|
return prop.columnTypes?.[0] ?? platform.getVarcharTypeDeclarationSQL(prop);
|
package/types/UuidType.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Type } from './Type.js';
|
|
2
2
|
import type { Platform } from '../platforms/Platform.js';
|
|
3
3
|
import type { EntityProperty } from '../typings.js';
|
|
4
|
+
/** Maps a database UUID column to a JS `string`, with platform-specific normalization. */
|
|
4
5
|
export declare class UuidType extends Type<string | null | undefined> {
|
|
5
6
|
getColumnType(prop: EntityProperty, platform: Platform): string;
|
|
6
7
|
compareAsType(): string;
|
package/types/UuidType.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { UnknownType } from './UnknownType.js';
|
|
|
25
25
|
import { UuidType } from './UuidType.js';
|
|
26
26
|
export type { TransformContext, IType };
|
|
27
27
|
export { Type, DateType, TimeType, DateTimeType, BigIntType, BlobType, Uint8ArrayType, ArrayType, EnumArrayType, EnumType, JsonType, IntegerType, SmallIntType, TinyIntType, MediumIntType, FloatType, DoubleType, BooleanType, DecimalType, StringType, UuidType, TextType, UnknownType, IntervalType, CharacterType, };
|
|
28
|
+
/** Registry of all built-in type constructors, keyed by their short name (e.g., `types.integer`, `types.uuid`). */
|
|
28
29
|
export declare const types: {
|
|
29
30
|
readonly date: typeof DateType;
|
|
30
31
|
readonly time: typeof TimeType;
|
|
@@ -51,6 +52,7 @@ export declare const types: {
|
|
|
51
52
|
readonly interval: typeof IntervalType;
|
|
52
53
|
readonly unknown: typeof UnknownType;
|
|
53
54
|
};
|
|
55
|
+
/** Shorthand alias for the `types` registry. */
|
|
54
56
|
export declare const t: {
|
|
55
57
|
readonly date: typeof DateType;
|
|
56
58
|
readonly time: typeof TimeType;
|
package/types/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import { Uint8ArrayType } from './Uint8ArrayType.js';
|
|
|
24
24
|
import { UnknownType } from './UnknownType.js';
|
|
25
25
|
import { UuidType } from './UuidType.js';
|
|
26
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, IntervalType, CharacterType, };
|
|
27
|
+
/** Registry of all built-in type constructors, keyed by their short name (e.g., `types.integer`, `types.uuid`). */
|
|
27
28
|
export const types = {
|
|
28
29
|
date: DateType,
|
|
29
30
|
time: TimeType,
|
|
@@ -50,6 +51,7 @@ export const types = {
|
|
|
50
51
|
interval: IntervalType,
|
|
51
52
|
unknown: UnknownType,
|
|
52
53
|
};
|
|
54
|
+
/** Shorthand alias for the `types` registry. */
|
|
53
55
|
export const t = types;
|
|
54
56
|
/**
|
|
55
57
|
* Brand each built-in type constructor with its registry key via a cross-module symbol.
|