@holo-js/db 0.1.2 → 0.1.4
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/dist/index.d.ts +256 -206
- package/dist/index.mjs +535 -585
- package/package.json +20 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { PoolConfig, QueryResult } from 'pg';
|
|
2
|
-
import { PoolOptions } from 'mysql2/promise';
|
|
3
|
-
|
|
4
1
|
type LogicalColumnKind = 'id' | 'integer' | 'bigInteger' | 'string' | 'text' | 'boolean' | 'real' | 'decimal' | 'date' | 'datetime' | 'timestamp' | 'json' | 'blob' | 'uuid' | 'ulid' | 'snowflake' | 'vector' | 'enum';
|
|
5
2
|
type ColumnDefaultKind = 'value' | 'now';
|
|
6
3
|
type IdGenerationStrategy = 'autoIncrement' | 'uuid' | 'ulid' | 'snowflake';
|
|
@@ -149,6 +146,9 @@ type ResolvedColumn<TColumn extends ColumnInput> = TColumn extends {
|
|
|
149
146
|
type BoundColumns<TColumns extends ColumnShapeInput$2> = {
|
|
150
147
|
[K in keyof TColumns]: ResolvedColumn<TColumns[K]>;
|
|
151
148
|
};
|
|
149
|
+
interface DefineTableOptions {
|
|
150
|
+
indexes?: readonly TableIndexDefinition[];
|
|
151
|
+
}
|
|
152
152
|
type BoundTableDefinition<TName extends string, TColumns extends ColumnShapeInput$2> = TableDefinition<TName, BoundColumns<TColumns>> & BoundColumns<TColumns>;
|
|
153
153
|
|
|
154
154
|
interface GeneratedSchemaTables {
|
|
@@ -551,84 +551,6 @@ interface DatabaseContextOptions {
|
|
|
551
551
|
modelRegistry?: ModelRegistry;
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
interface PaginationMeta {
|
|
555
|
-
readonly total: number;
|
|
556
|
-
readonly perPage: number;
|
|
557
|
-
readonly pageName: string;
|
|
558
|
-
readonly currentPage: number;
|
|
559
|
-
readonly lastPage: number;
|
|
560
|
-
readonly from: number | null;
|
|
561
|
-
readonly to: number | null;
|
|
562
|
-
readonly hasMorePages: boolean;
|
|
563
|
-
}
|
|
564
|
-
interface PaginatorMethods<T> {
|
|
565
|
-
items(): readonly T[];
|
|
566
|
-
firstItem(): number | null;
|
|
567
|
-
lastItem(): number | null;
|
|
568
|
-
hasPages(): boolean;
|
|
569
|
-
hasMorePages(): boolean;
|
|
570
|
-
getPageName(): string;
|
|
571
|
-
toJSON(): {
|
|
572
|
-
data: readonly T[];
|
|
573
|
-
meta: PaginationMeta;
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
interface SimplePaginationMeta {
|
|
577
|
-
readonly perPage: number;
|
|
578
|
-
readonly pageName: string;
|
|
579
|
-
readonly currentPage: number;
|
|
580
|
-
readonly from: number | null;
|
|
581
|
-
readonly to: number | null;
|
|
582
|
-
readonly hasMorePages: boolean;
|
|
583
|
-
}
|
|
584
|
-
interface SimplePaginatorMethods<T> {
|
|
585
|
-
items(): readonly T[];
|
|
586
|
-
firstItem(): number | null;
|
|
587
|
-
lastItem(): number | null;
|
|
588
|
-
hasPages(): boolean;
|
|
589
|
-
hasMorePages(): boolean;
|
|
590
|
-
getPageName(): string;
|
|
591
|
-
toJSON(): {
|
|
592
|
-
data: readonly T[];
|
|
593
|
-
meta: SimplePaginationMeta;
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
interface PaginatedResult<T> extends PaginatorMethods<T> {
|
|
597
|
-
readonly data: readonly T[];
|
|
598
|
-
readonly meta: PaginationMeta;
|
|
599
|
-
}
|
|
600
|
-
interface SimplePaginatedResult<T> extends SimplePaginatorMethods<T> {
|
|
601
|
-
readonly data: readonly T[];
|
|
602
|
-
readonly meta: SimplePaginationMeta;
|
|
603
|
-
}
|
|
604
|
-
interface CursorPaginatorMethods<T> {
|
|
605
|
-
items(): readonly T[];
|
|
606
|
-
hasMorePages(): boolean;
|
|
607
|
-
getCursorName(): string;
|
|
608
|
-
nextCursorToken(): string | null;
|
|
609
|
-
previousCursorToken(): string | null;
|
|
610
|
-
toJSON(): {
|
|
611
|
-
data: readonly T[];
|
|
612
|
-
perPage: number;
|
|
613
|
-
cursorName: string;
|
|
614
|
-
nextCursor: string | null;
|
|
615
|
-
prevCursor: string | null;
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
interface CursorPaginatedResult<T> extends CursorPaginatorMethods<T> {
|
|
619
|
-
readonly data: readonly T[];
|
|
620
|
-
readonly perPage: number;
|
|
621
|
-
readonly cursorName: string;
|
|
622
|
-
readonly nextCursor: string | null;
|
|
623
|
-
readonly prevCursor: string | null;
|
|
624
|
-
}
|
|
625
|
-
interface PaginationOptions {
|
|
626
|
-
readonly pageName?: string;
|
|
627
|
-
}
|
|
628
|
-
interface CursorPaginationOptions {
|
|
629
|
-
readonly cursorName?: string;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
554
|
type QueryOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'in' | 'not in' | 'between' | 'not between' | 'like';
|
|
633
555
|
type QueryDirection = 'asc' | 'desc';
|
|
634
556
|
type QueryLockMode = 'update' | 'share';
|
|
@@ -834,6 +756,152 @@ declare function createInsertQueryPlan(source: QuerySource, values: readonly Rec
|
|
|
834
756
|
declare function createUpdateQueryPlan(source: QuerySource, predicates: readonly QueryPredicateNode[], values: Readonly<Record<string, unknown>>): UpdateQueryPlan;
|
|
835
757
|
declare function createDeleteQueryPlan(source: QuerySource, predicates: readonly QueryPredicateNode[]): DeleteQueryPlan;
|
|
836
758
|
|
|
759
|
+
type QueryCacheTtlInput = number | Date;
|
|
760
|
+
type QueryCacheFlexibleTtlInput = readonly [fresh: number, stale: number] | {
|
|
761
|
+
readonly fresh: number;
|
|
762
|
+
readonly stale: number;
|
|
763
|
+
};
|
|
764
|
+
interface QueryCacheConfig {
|
|
765
|
+
readonly ttl?: QueryCacheTtlInput;
|
|
766
|
+
readonly key?: string;
|
|
767
|
+
readonly driver?: string;
|
|
768
|
+
readonly flexible?: QueryCacheFlexibleTtlInput;
|
|
769
|
+
readonly invalidate?: readonly string[];
|
|
770
|
+
}
|
|
771
|
+
interface NormalizedQueryCacheConfig {
|
|
772
|
+
readonly ttl?: QueryCacheTtlInput;
|
|
773
|
+
readonly key?: string;
|
|
774
|
+
readonly driver?: string;
|
|
775
|
+
readonly flexible?: QueryCacheFlexibleTtlInput;
|
|
776
|
+
readonly invalidate?: readonly string[];
|
|
777
|
+
}
|
|
778
|
+
interface DatabaseQueryCacheBridge {
|
|
779
|
+
get<TValue>(key: string, options?: {
|
|
780
|
+
readonly driver?: string;
|
|
781
|
+
}): Promise<TValue | null>;
|
|
782
|
+
put<TValue>(key: string, value: TValue, options: {
|
|
783
|
+
readonly driver?: string;
|
|
784
|
+
readonly ttl?: QueryCacheTtlInput;
|
|
785
|
+
readonly dependencies?: readonly string[];
|
|
786
|
+
}): Promise<void>;
|
|
787
|
+
flexible<TValue>(key: string, ttl: QueryCacheFlexibleTtlInput, callback: () => TValue | Promise<TValue>, options?: {
|
|
788
|
+
readonly driver?: string;
|
|
789
|
+
readonly dependencies?: readonly string[];
|
|
790
|
+
}): Promise<TValue>;
|
|
791
|
+
forget(key: string, options?: {
|
|
792
|
+
readonly driver?: string;
|
|
793
|
+
}): Promise<boolean>;
|
|
794
|
+
invalidateDependencies(dependencies: readonly string[], options?: {
|
|
795
|
+
readonly driver?: string;
|
|
796
|
+
}): Promise<void>;
|
|
797
|
+
}
|
|
798
|
+
declare function getQueryCacheBridgeState(): {
|
|
799
|
+
bridge?: DatabaseQueryCacheBridge;
|
|
800
|
+
};
|
|
801
|
+
declare function configureDatabaseQueryCacheBridge(bridge?: DatabaseQueryCacheBridge): void;
|
|
802
|
+
declare function getDatabaseQueryCacheBridge(): DatabaseQueryCacheBridge | undefined;
|
|
803
|
+
declare function resetDatabaseQueryCacheBridge(): void;
|
|
804
|
+
declare function normalizeQueryCacheConfig(input: QueryCacheTtlInput | QueryCacheConfig): NormalizedQueryCacheConfig;
|
|
805
|
+
declare function createDeterministicQueryCacheKey(statement: CompiledStatement, connectionName: string): string;
|
|
806
|
+
declare function resolveQueryCacheKey(statement: CompiledStatement, connectionName: string, config: NormalizedQueryCacheConfig): string;
|
|
807
|
+
declare function createTableCacheDependency(connectionName: string, tableName: string): string;
|
|
808
|
+
declare function normalizeQueryCacheDependencies(connectionName: string, dependencies: readonly string[]): readonly string[];
|
|
809
|
+
declare function supportsAutomaticPredicateInvalidation(predicate: QueryPredicateNode): boolean;
|
|
810
|
+
declare function supportsAutomaticQueryCacheInvalidation(plan: SelectQueryPlan): boolean;
|
|
811
|
+
declare function inferAutomaticQueryCacheDependencies(plan: SelectQueryPlan, connectionName: string): readonly string[] | undefined;
|
|
812
|
+
declare function resolveQueryCacheDependencies(plan: SelectQueryPlan, connectionName: string, explicit?: readonly string[]): readonly string[] | undefined;
|
|
813
|
+
declare const queryCacheInternals: {
|
|
814
|
+
configureDatabaseQueryCacheBridge: typeof configureDatabaseQueryCacheBridge;
|
|
815
|
+
createDeterministicQueryCacheKey: typeof createDeterministicQueryCacheKey;
|
|
816
|
+
createTableCacheDependency: typeof createTableCacheDependency;
|
|
817
|
+
getQueryCacheBridgeState: typeof getQueryCacheBridgeState;
|
|
818
|
+
inferAutomaticQueryCacheDependencies: typeof inferAutomaticQueryCacheDependencies;
|
|
819
|
+
normalizeQueryCacheConfig: typeof normalizeQueryCacheConfig;
|
|
820
|
+
normalizeQueryCacheDependencies: typeof normalizeQueryCacheDependencies;
|
|
821
|
+
resolveQueryCacheDependencies: typeof resolveQueryCacheDependencies;
|
|
822
|
+
resolveQueryCacheKey: typeof resolveQueryCacheKey;
|
|
823
|
+
supportsAutomaticPredicateInvalidation: typeof supportsAutomaticPredicateInvalidation;
|
|
824
|
+
supportsAutomaticQueryCacheInvalidation: typeof supportsAutomaticQueryCacheInvalidation;
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
interface PaginationMeta {
|
|
828
|
+
readonly total: number;
|
|
829
|
+
readonly perPage: number;
|
|
830
|
+
readonly pageName: string;
|
|
831
|
+
readonly currentPage: number;
|
|
832
|
+
readonly lastPage: number;
|
|
833
|
+
readonly from: number | null;
|
|
834
|
+
readonly to: number | null;
|
|
835
|
+
readonly hasMorePages: boolean;
|
|
836
|
+
}
|
|
837
|
+
interface PaginatorMethods<T> {
|
|
838
|
+
items(): readonly T[];
|
|
839
|
+
firstItem(): number | null;
|
|
840
|
+
lastItem(): number | null;
|
|
841
|
+
hasPages(): boolean;
|
|
842
|
+
hasMorePages(): boolean;
|
|
843
|
+
getPageName(): string;
|
|
844
|
+
toJSON(): {
|
|
845
|
+
data: readonly T[];
|
|
846
|
+
meta: PaginationMeta;
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
interface SimplePaginationMeta {
|
|
850
|
+
readonly perPage: number;
|
|
851
|
+
readonly pageName: string;
|
|
852
|
+
readonly currentPage: number;
|
|
853
|
+
readonly from: number | null;
|
|
854
|
+
readonly to: number | null;
|
|
855
|
+
readonly hasMorePages: boolean;
|
|
856
|
+
}
|
|
857
|
+
interface SimplePaginatorMethods<T> {
|
|
858
|
+
items(): readonly T[];
|
|
859
|
+
firstItem(): number | null;
|
|
860
|
+
lastItem(): number | null;
|
|
861
|
+
hasPages(): boolean;
|
|
862
|
+
hasMorePages(): boolean;
|
|
863
|
+
getPageName(): string;
|
|
864
|
+
toJSON(): {
|
|
865
|
+
data: readonly T[];
|
|
866
|
+
meta: SimplePaginationMeta;
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
interface PaginatedResult<T> extends PaginatorMethods<T> {
|
|
870
|
+
readonly data: readonly T[];
|
|
871
|
+
readonly meta: PaginationMeta;
|
|
872
|
+
}
|
|
873
|
+
interface SimplePaginatedResult<T> extends SimplePaginatorMethods<T> {
|
|
874
|
+
readonly data: readonly T[];
|
|
875
|
+
readonly meta: SimplePaginationMeta;
|
|
876
|
+
}
|
|
877
|
+
interface CursorPaginatorMethods<T> {
|
|
878
|
+
items(): readonly T[];
|
|
879
|
+
hasMorePages(): boolean;
|
|
880
|
+
getCursorName(): string;
|
|
881
|
+
nextCursorToken(): string | null;
|
|
882
|
+
previousCursorToken(): string | null;
|
|
883
|
+
toJSON(): {
|
|
884
|
+
data: readonly T[];
|
|
885
|
+
perPage: number;
|
|
886
|
+
cursorName: string;
|
|
887
|
+
nextCursor: string | null;
|
|
888
|
+
prevCursor: string | null;
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
interface CursorPaginatedResult<T> extends CursorPaginatorMethods<T> {
|
|
892
|
+
readonly data: readonly T[];
|
|
893
|
+
readonly perPage: number;
|
|
894
|
+
readonly cursorName: string;
|
|
895
|
+
readonly nextCursor: string | null;
|
|
896
|
+
readonly prevCursor: string | null;
|
|
897
|
+
}
|
|
898
|
+
interface PaginationOptions {
|
|
899
|
+
readonly pageName?: string;
|
|
900
|
+
}
|
|
901
|
+
interface CursorPaginationOptions {
|
|
902
|
+
readonly cursorName?: string;
|
|
903
|
+
}
|
|
904
|
+
|
|
837
905
|
type SelectRow<TTableOrName extends string | TableDefinition> = TTableOrName extends TableDefinition ? InferSelect<TTableOrName> : Record<string, unknown>;
|
|
838
906
|
type TableReference = string | TableDefinition;
|
|
839
907
|
type BuilderCallback$2<TBuilder> = (query: TBuilder) => unknown;
|
|
@@ -849,9 +917,10 @@ type MergeSelections<TTableOrName extends TableReference, TCurrentRow extends Re
|
|
|
849
917
|
type AggregateSelectionResult<TAlias extends string, TValue> = Record<TAlias, TValue>;
|
|
850
918
|
declare class TableQueryBuilder<TTableOrName extends TableReference = string, TSelectedRow extends Record<string, unknown> = SelectRow<TTableOrName>> {
|
|
851
919
|
private readonly connection;
|
|
920
|
+
private readonly queryCacheConfig?;
|
|
852
921
|
private readonly source;
|
|
853
922
|
private readonly plan;
|
|
854
|
-
constructor(table: TTableOrName, connection: DatabaseContext, plan?: SelectQueryPlan);
|
|
923
|
+
constructor(table: TTableOrName, connection: DatabaseContext, plan?: SelectQueryPlan, queryCacheConfig?: NormalizedQueryCacheConfig | undefined);
|
|
855
924
|
getTableName(): string;
|
|
856
925
|
getConnectionName(): string;
|
|
857
926
|
getConnection(): DatabaseContext;
|
|
@@ -1014,6 +1083,7 @@ declare class TableQueryBuilder<TTableOrName extends TableReference = string, TS
|
|
|
1014
1083
|
source?: string;
|
|
1015
1084
|
};
|
|
1016
1085
|
dump(): TableQueryBuilder<TTableOrName, TSelectedRow>;
|
|
1086
|
+
cache(config: QueryCacheTtlInput | QueryCacheConfig): TableQueryBuilder<TTableOrName, TSelectedRow>;
|
|
1017
1087
|
get<TRow extends Record<string, unknown> = TSelectedRow>(): Promise<TRow[]>;
|
|
1018
1088
|
first<TRow extends Record<string, unknown> = TSelectedRow>(): Promise<TRow | undefined>;
|
|
1019
1089
|
sole<TRow extends Record<string, unknown> = TSelectedRow>(): Promise<TRow>;
|
|
@@ -1049,6 +1119,7 @@ declare class TableQueryBuilder<TTableOrName extends TableReference = string, TS
|
|
|
1049
1119
|
unsafeQuery<TRow extends Record<string, unknown> = Record<string, unknown>>(statement: Omit<UnsafeStatement, 'source'>): Promise<DriverQueryResult<TRow>>;
|
|
1050
1120
|
unsafeExecute(statement: Omit<UnsafeStatement, 'source'>): Promise<DriverExecutionResult>;
|
|
1051
1121
|
private clone;
|
|
1122
|
+
private invalidateSourceTableQueries;
|
|
1052
1123
|
private getCompiler;
|
|
1053
1124
|
private getUnpaginatedRows;
|
|
1054
1125
|
private resolvePrimaryKeyColumn;
|
|
@@ -1057,11 +1128,7 @@ declare class TableQueryBuilder<TTableOrName extends TableReference = string, TS
|
|
|
1057
1128
|
private whereMultiColumns;
|
|
1058
1129
|
private whereFullTextWithBoolean;
|
|
1059
1130
|
private whereVectorSimilarToWithBoolean;
|
|
1060
|
-
private assertPositiveInteger;
|
|
1061
|
-
private normalizePaginationParameterName;
|
|
1062
1131
|
private prepareCursorPaginationQuery;
|
|
1063
|
-
private encodeCursor;
|
|
1064
|
-
private decodeCursor;
|
|
1065
1132
|
private aggregateNumeric;
|
|
1066
1133
|
private extractNumericValues;
|
|
1067
1134
|
private normalizeUpdateValues;
|
|
@@ -1364,6 +1431,7 @@ type MorphModelTarget$1 = {
|
|
|
1364
1431
|
morphClass?: string;
|
|
1365
1432
|
};
|
|
1366
1433
|
};
|
|
1434
|
+
type MorphRelationTypeInput = string | MorphModelTarget$1 | readonly (string | MorphModelTarget$1)[];
|
|
1367
1435
|
type MorphTypeSelector$1 = string | MorphModelTarget$1 | MorphEntityTarget$1 | null;
|
|
1368
1436
|
type EagerLoad = {
|
|
1369
1437
|
relation: string;
|
|
@@ -1488,24 +1556,8 @@ declare class ModelQueryBuilder<TTable extends TableDefinition = TableDefinition
|
|
|
1488
1556
|
orWhereDoesntHave(relation: ModelRelationPath<TRelations>, constraint?: RelationConstraint): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1489
1557
|
whereRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1490
1558
|
orWhereRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1491
|
-
whereMorphRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, types:
|
|
1492
|
-
|
|
1493
|
-
morphClass?: string;
|
|
1494
|
-
};
|
|
1495
|
-
} | readonly (string | {
|
|
1496
|
-
definition?: {
|
|
1497
|
-
morphClass?: string;
|
|
1498
|
-
};
|
|
1499
|
-
})[], column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1500
|
-
orWhereMorphRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, types: string | {
|
|
1501
|
-
definition?: {
|
|
1502
|
-
morphClass?: string;
|
|
1503
|
-
};
|
|
1504
|
-
} | readonly (string | {
|
|
1505
|
-
definition?: {
|
|
1506
|
-
morphClass?: string;
|
|
1507
|
-
};
|
|
1508
|
-
})[], column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1559
|
+
whereMorphRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, types: MorphRelationTypeInput, column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1560
|
+
orWhereMorphRelation<TRelationPath extends ModelRelationPath<TRelations>>(relation: TRelationPath, types: MorphRelationTypeInput, column: RelatedColumnNameForRelationPath<TRelations, TRelationPath>, operator: unknown, value?: unknown): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1509
1561
|
whereBelongsTo<TRelated extends TableDefinition>(relatedEntity: Entity<TRelated>, relationName?: ModelRelationPath<TRelations>): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1510
1562
|
orWhereBelongsTo<TRelated extends TableDefinition>(relatedEntity: Entity<TRelated>, relationName?: ModelRelationPath<TRelations>): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1511
1563
|
whereMorphedTo(relation: ModelRelationPath<TRelations>, target: MorphTypeSelector$1): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
@@ -1562,6 +1614,7 @@ declare class ModelQueryBuilder<TTable extends TableDefinition = TableDefinition
|
|
|
1562
1614
|
source?: string;
|
|
1563
1615
|
};
|
|
1564
1616
|
dump(): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1617
|
+
cache(config: QueryCacheTtlInput | QueryCacheConfig): ModelQueryBuilder<TTable, TRelations, TLoaded>;
|
|
1565
1618
|
get(): Promise<ModelCollection<TTable, TRelations> & Array<EntityWithLoaded<TTable, TRelations, TLoaded>>>;
|
|
1566
1619
|
first(): Promise<EntityWithLoaded<TTable, TRelations, TLoaded> | undefined>;
|
|
1567
1620
|
sole(): Promise<EntityWithLoaded<TTable, TRelations, TLoaded>>;
|
|
@@ -1607,6 +1660,7 @@ declare class ModelQueryBuilder<TTable extends TableDefinition = TableDefinition
|
|
|
1607
1660
|
private normalizeAggregateLoads;
|
|
1608
1661
|
private normalizeMorphTypes;
|
|
1609
1662
|
private applyMorphedToFilter;
|
|
1663
|
+
private applyMorphRelationFilter;
|
|
1610
1664
|
private normalizeMorphedToTarget;
|
|
1611
1665
|
private isMorphEntityTarget;
|
|
1612
1666
|
private getMorphTargetLabels;
|
|
@@ -1614,13 +1668,10 @@ declare class ModelQueryBuilder<TTable extends TableDefinition = TableDefinition
|
|
|
1614
1668
|
private normalizeColumnAggregateLoads;
|
|
1615
1669
|
private parseAggregateRelation;
|
|
1616
1670
|
private resolveBelongsToRelation;
|
|
1671
|
+
private applyBelongsToFilter;
|
|
1617
1672
|
private resolveBelongsToRelationName;
|
|
1618
1673
|
private extractNumericValues;
|
|
1619
1674
|
private getUnpaginatedEntities;
|
|
1620
|
-
private encodeCursor;
|
|
1621
|
-
private decodeCursor;
|
|
1622
|
-
private assertPositiveInteger;
|
|
1623
|
-
private normalizePaginationParameterName;
|
|
1624
1675
|
private prepareCursorPaginationQuery;
|
|
1625
1676
|
}
|
|
1626
1677
|
|
|
@@ -2864,7 +2915,6 @@ declare class ConnectionManager {
|
|
|
2864
2915
|
declare function createConnectionManager(options: ConnectionManagerOptions): ConnectionManager;
|
|
2865
2916
|
|
|
2866
2917
|
declare class DatabaseFacade {
|
|
2867
|
-
private manager?;
|
|
2868
2918
|
configure(manager: ConnectionManager): void;
|
|
2869
2919
|
reset(): void;
|
|
2870
2920
|
getManager(): ConnectionManager;
|
|
@@ -2887,12 +2937,32 @@ interface ActiveConnectionScope {
|
|
|
2887
2937
|
connection: DatabaseContext;
|
|
2888
2938
|
}
|
|
2889
2939
|
declare class AsyncConnectionContext {
|
|
2890
|
-
private readonly storage;
|
|
2891
2940
|
run<T>(scope: ActiveConnectionScope, callback: () => T): T;
|
|
2892
2941
|
getActive(): ActiveConnectionScope | undefined;
|
|
2893
2942
|
}
|
|
2894
2943
|
declare const connectionAsyncContext: AsyncConnectionContext;
|
|
2895
2944
|
|
|
2945
|
+
declare abstract class LazyDriverAdapter implements DriverAdapter {
|
|
2946
|
+
private adapter?;
|
|
2947
|
+
private pending?;
|
|
2948
|
+
protected connected: boolean;
|
|
2949
|
+
protected abstract readonly driverLabel: string;
|
|
2950
|
+
protected abstract createConcreteAdapter(): Promise<DriverAdapter>;
|
|
2951
|
+
protected resolveAdapter(): Promise<DriverAdapter>;
|
|
2952
|
+
initialize(): Promise<void>;
|
|
2953
|
+
disconnect(): Promise<void>;
|
|
2954
|
+
isConnected(): boolean;
|
|
2955
|
+
runWithTransactionScope<T>(callback: () => Promise<T>): Promise<T>;
|
|
2956
|
+
introspect<TRow extends Record<string, unknown> = Record<string, unknown>>(sql: string, bindings?: readonly unknown[], options?: DatabaseOperationOptions): Promise<DriverQueryResult<TRow>>;
|
|
2957
|
+
query<TRow extends Record<string, unknown> = Record<string, unknown>>(sql: string, bindings?: readonly unknown[], options?: DatabaseOperationOptions): Promise<DriverQueryResult<TRow>>;
|
|
2958
|
+
execute(sql: string, bindings?: readonly unknown[], options?: DatabaseOperationOptions): Promise<DriverExecutionResult>;
|
|
2959
|
+
beginTransaction(options?: DatabaseOperationOptions): Promise<void>;
|
|
2960
|
+
commit(options?: DatabaseOperationOptions): Promise<void>;
|
|
2961
|
+
rollback(options?: DatabaseOperationOptions): Promise<void>;
|
|
2962
|
+
createSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2963
|
+
rollbackToSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2964
|
+
releaseSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2965
|
+
}
|
|
2896
2966
|
interface SQLiteStatementLike {
|
|
2897
2967
|
all(...params: readonly unknown[]): Record<string, unknown>[];
|
|
2898
2968
|
run(...params: readonly unknown[]): {
|
|
@@ -2910,33 +2980,19 @@ interface SQLiteAdapterOptions {
|
|
|
2910
2980
|
database?: SQLiteDatabaseLike;
|
|
2911
2981
|
createDatabase?: (filename: string) => SQLiteDatabaseLike;
|
|
2912
2982
|
}
|
|
2913
|
-
declare class SQLiteAdapter
|
|
2914
|
-
private
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
private readonly createDatabaseInstance;
|
|
2983
|
+
declare class SQLiteAdapter extends LazyDriverAdapter {
|
|
2984
|
+
private readonly options;
|
|
2985
|
+
protected readonly driverLabel = "SQLiteAdapter";
|
|
2986
|
+
readonly filename: string;
|
|
2918
2987
|
constructor(options?: SQLiteAdapterOptions);
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
introspect<TRow extends Record<string, unknown> = Record<string, unknown>>(sql: string, bindings?: readonly unknown[]): Promise<DriverQueryResult<TRow>>;
|
|
2924
|
-
execute(sql: string, bindings?: readonly unknown[]): Promise<DriverExecutionResult>;
|
|
2925
|
-
beginTransaction(): Promise<void>;
|
|
2926
|
-
commit(): Promise<void>;
|
|
2927
|
-
rollback(): Promise<void>;
|
|
2928
|
-
createSavepoint(name: string): Promise<void>;
|
|
2929
|
-
rollbackToSavepoint(name: string): Promise<void>;
|
|
2930
|
-
releaseSavepoint(name: string): Promise<void>;
|
|
2931
|
-
private getDatabase;
|
|
2932
|
-
private normalizeSavepointName;
|
|
2933
|
-
private invokeStatement;
|
|
2934
|
-
private isBindingArityError;
|
|
2988
|
+
protected createConcreteAdapter(): Promise<DriverAdapter>;
|
|
2989
|
+
createSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2990
|
+
rollbackToSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2991
|
+
releaseSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
2935
2992
|
}
|
|
2936
2993
|
declare function createSQLiteAdapter(options?: SQLiteAdapterOptions): SQLiteAdapter;
|
|
2937
|
-
|
|
2938
2994
|
interface PostgresQueryableLike {
|
|
2939
|
-
query(sql: string, bindings?: readonly unknown[]): Promise<
|
|
2995
|
+
query(sql: string, bindings?: readonly unknown[]): Promise<{
|
|
2940
2996
|
rows: Record<string, unknown>[];
|
|
2941
2997
|
rowCount?: number | null;
|
|
2942
2998
|
}>;
|
|
@@ -2949,45 +3005,40 @@ interface PostgresPoolLike extends PostgresQueryableLike {
|
|
|
2949
3005
|
connect(): Promise<PostgresClientLike>;
|
|
2950
3006
|
end(): Promise<void>;
|
|
2951
3007
|
}
|
|
2952
|
-
interface
|
|
3008
|
+
interface PostgresConnectionConfig {
|
|
2953
3009
|
connectionString?: string;
|
|
2954
|
-
|
|
3010
|
+
host?: string;
|
|
3011
|
+
port?: number;
|
|
3012
|
+
user?: string;
|
|
3013
|
+
password?: string;
|
|
3014
|
+
database?: string;
|
|
3015
|
+
ssl?: boolean | Record<string, unknown>;
|
|
3016
|
+
}
|
|
3017
|
+
interface PostgresAdapterOptions<TConfig extends PostgresConnectionConfig = PostgresConnectionConfig> {
|
|
3018
|
+
connectionString?: string;
|
|
3019
|
+
config?: TConfig;
|
|
2955
3020
|
client?: PostgresClientLike;
|
|
2956
3021
|
pool?: PostgresPoolLike;
|
|
2957
|
-
createPool?: (config?:
|
|
2958
|
-
}
|
|
2959
|
-
declare class PostgresAdapter
|
|
2960
|
-
private
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
commit(): Promise<void>;
|
|
2978
|
-
rollback(): Promise<void>;
|
|
2979
|
-
createSavepoint(name: string): Promise<void>;
|
|
2980
|
-
rollbackToSavepoint(name: string): Promise<void>;
|
|
2981
|
-
releaseSavepoint(name: string): Promise<void>;
|
|
2982
|
-
private getQueryable;
|
|
2983
|
-
private leaseTransactionClient;
|
|
2984
|
-
private requireTransactionClient;
|
|
2985
|
-
private releaseTransactionClient;
|
|
2986
|
-
private releaseScopedTransaction;
|
|
2987
|
-
private normalizeSavepointName;
|
|
2988
|
-
}
|
|
2989
|
-
declare function createPostgresAdapter(options?: PostgresAdapterOptions): PostgresAdapter;
|
|
2990
|
-
|
|
3022
|
+
createPool?: (config?: TConfig) => PostgresPoolLike;
|
|
3023
|
+
}
|
|
3024
|
+
declare class PostgresAdapter<TConfig extends PostgresConnectionConfig = PostgresConnectionConfig> extends LazyDriverAdapter {
|
|
3025
|
+
private readonly options;
|
|
3026
|
+
protected readonly driverLabel = "PostgresAdapter";
|
|
3027
|
+
readonly config?: TConfig;
|
|
3028
|
+
constructor(options?: PostgresAdapterOptions<TConfig>);
|
|
3029
|
+
protected createConcreteAdapter(): Promise<DriverAdapter>;
|
|
3030
|
+
releaseScopedTransaction(state: {
|
|
3031
|
+
client: {
|
|
3032
|
+
release?(): void;
|
|
3033
|
+
};
|
|
3034
|
+
leased: boolean;
|
|
3035
|
+
released: boolean;
|
|
3036
|
+
}): void;
|
|
3037
|
+
createSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3038
|
+
rollbackToSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3039
|
+
releaseSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3040
|
+
}
|
|
3041
|
+
declare function createPostgresAdapter<TConfig extends PostgresConnectionConfig = PostgresConnectionConfig>(options?: PostgresAdapterOptions<TConfig>): PostgresAdapter<TConfig>;
|
|
2991
3042
|
interface MySQLQueryableLike {
|
|
2992
3043
|
query(sql: string, bindings?: readonly unknown[]): Promise<readonly [unknown, unknown]>;
|
|
2993
3044
|
}
|
|
@@ -2999,44 +3050,40 @@ interface MySQLPoolLike extends MySQLQueryableLike {
|
|
|
2999
3050
|
getConnection(): Promise<MySQLClientLike>;
|
|
3000
3051
|
end(): Promise<void>;
|
|
3001
3052
|
}
|
|
3002
|
-
interface
|
|
3053
|
+
interface MySQLConnectionConfig {
|
|
3054
|
+
host?: string;
|
|
3055
|
+
port?: number;
|
|
3056
|
+
user?: string;
|
|
3057
|
+
password?: string;
|
|
3058
|
+
database?: string;
|
|
3059
|
+
ssl?: unknown;
|
|
3003
3060
|
uri?: string;
|
|
3004
|
-
|
|
3061
|
+
}
|
|
3062
|
+
interface MySQLAdapterOptions<TConfig extends MySQLConnectionConfig = MySQLConnectionConfig> {
|
|
3063
|
+
uri?: string;
|
|
3064
|
+
config?: TConfig;
|
|
3005
3065
|
client?: MySQLClientLike;
|
|
3006
3066
|
pool?: MySQLPoolLike;
|
|
3007
|
-
createPool?: (config:
|
|
3008
|
-
}
|
|
3009
|
-
declare class MySQLAdapter
|
|
3010
|
-
private
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
commit(): Promise<void>;
|
|
3028
|
-
rollback(): Promise<void>;
|
|
3029
|
-
createSavepoint(name: string): Promise<void>;
|
|
3030
|
-
rollbackToSavepoint(name: string): Promise<void>;
|
|
3031
|
-
releaseSavepoint(name: string): Promise<void>;
|
|
3032
|
-
private getQueryable;
|
|
3033
|
-
private leaseTransactionClient;
|
|
3034
|
-
private requireTransactionClient;
|
|
3035
|
-
private releaseTransactionClient;
|
|
3036
|
-
private releaseScopedTransaction;
|
|
3037
|
-
private normalizeSavepointName;
|
|
3038
|
-
}
|
|
3039
|
-
declare function createMySQLAdapter(options?: MySQLAdapterOptions): MySQLAdapter;
|
|
3067
|
+
createPool?: (config: TConfig) => MySQLPoolLike;
|
|
3068
|
+
}
|
|
3069
|
+
declare class MySQLAdapter<TConfig extends MySQLConnectionConfig = MySQLConnectionConfig> extends LazyDriverAdapter {
|
|
3070
|
+
private readonly options;
|
|
3071
|
+
protected readonly driverLabel = "MySQLAdapter";
|
|
3072
|
+
readonly config: TConfig;
|
|
3073
|
+
constructor(options?: MySQLAdapterOptions<TConfig>);
|
|
3074
|
+
protected createConcreteAdapter(): Promise<DriverAdapter>;
|
|
3075
|
+
releaseScopedTransaction(state: {
|
|
3076
|
+
client: {
|
|
3077
|
+
release?(): void;
|
|
3078
|
+
};
|
|
3079
|
+
leased: boolean;
|
|
3080
|
+
released: boolean;
|
|
3081
|
+
}): void;
|
|
3082
|
+
createSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3083
|
+
rollbackToSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3084
|
+
releaseSavepoint(name: string, options?: DatabaseOperationOptions): Promise<void>;
|
|
3085
|
+
}
|
|
3086
|
+
declare function createMySQLAdapter<TConfig extends MySQLConnectionConfig = MySQLConnectionConfig>(options?: MySQLAdapterOptions<TConfig>): MySQLAdapter<TConfig>;
|
|
3040
3087
|
|
|
3041
3088
|
type SupportedDatabaseDriver = 'sqlite' | 'postgres' | 'mysql';
|
|
3042
3089
|
interface RuntimeConnectionConfig {
|
|
@@ -3077,7 +3124,7 @@ type RuntimeAdapterConnectionConfig = {
|
|
|
3077
3124
|
declare function isSupportedDatabaseDriver(value: string): value is SupportedDatabaseDriver;
|
|
3078
3125
|
declare function parseDatabaseDriver(value: string | undefined, fallback: SupportedDatabaseDriver): SupportedDatabaseDriver;
|
|
3079
3126
|
declare function createDialect(driver: SupportedDatabaseDriver): Dialect;
|
|
3080
|
-
declare function createAdapter(driver: SupportedDatabaseDriver, connection: string | RuntimeAdapterConnectionConfig): SQLiteAdapter | PostgresAdapter | MySQLAdapter
|
|
3127
|
+
declare function createAdapter(driver: SupportedDatabaseDriver, connection: string | RuntimeAdapterConnectionConfig): SQLiteAdapter | PostgresAdapter<PostgresConnectionConfig> | MySQLAdapter<MySQLConnectionConfig>;
|
|
3081
3128
|
declare function createRuntimeLogger(enabled: boolean): DatabaseLogger | undefined;
|
|
3082
3129
|
declare function createRuntimeConnectionOptions(driver: SupportedDatabaseDriver, connection: string | RuntimeAdapterConnectionConfig, dbLogging: boolean, schemaName?: string, connectionName?: string): DatabaseContextOptions;
|
|
3083
3130
|
declare function resolveRuntimeConnectionManagerOptions(config: RuntimeConfigInput): ConnectionManager;
|
|
@@ -3141,6 +3188,7 @@ declare class SQLQueryCompiler {
|
|
|
3141
3188
|
}
|
|
3142
3189
|
|
|
3143
3190
|
declare class SQLiteQueryCompiler extends SQLQueryCompiler {
|
|
3191
|
+
protected compileLockClause(_lockMode: QueryLockMode): string;
|
|
3144
3192
|
protected compileJsonPredicate(predicate: QueryJsonPredicate, bindings: unknown[]): string;
|
|
3145
3193
|
protected compileJsonUpdateOperations(column: string, operations: readonly QueryJsonUpdateOperation[], bindings: unknown[]): string;
|
|
3146
3194
|
protected compileDatePredicate(predicate: QueryDatePredicate, placeholder: string): string;
|
|
@@ -3750,6 +3798,8 @@ interface HoloProjectPaths {
|
|
|
3750
3798
|
jobs: string;
|
|
3751
3799
|
events: string;
|
|
3752
3800
|
listeners: string;
|
|
3801
|
+
authorizationPolicies: string;
|
|
3802
|
+
authorizationAbilities: string;
|
|
3753
3803
|
}
|
|
3754
3804
|
interface HoloProjectConnectionConfig {
|
|
3755
3805
|
driver?: SupportedDatabaseDriver;
|
|
@@ -3786,4 +3836,4 @@ interface NormalizedHoloProjectConfig {
|
|
|
3786
3836
|
declare function normalizeHoloProjectConfig(config?: HoloProjectConfig): NormalizedHoloProjectConfig;
|
|
3787
3837
|
declare function defineHoloProject<TConfig extends HoloProjectConfig>(config: TConfig): NormalizedHoloProjectConfig & TConfig;
|
|
3788
3838
|
|
|
3789
|
-
export { type AddColumnOperation, type AlterColumnOperation, type AnyColumnDefinition, AsyncConnectionContext, CapabilityError, ColumnBuilder, type ColumnDefinition, type CompiledStatement, CompilerError, type ConcurrencyOptions, ConfigurationError, ConnectionManager, type ConnectionManagerOptions, type CreateForeignKeyOperation, type CreateIndexOperation, type CreateTableOperation, type CursorPaginatedResult, DB, type DDLOperation, type DDLStatement, DEFAULT_CAPABILITIES, DEFAULT_HOLO_PROJECT_PATHS, DEFAULT_SECURITY_POLICY, DIALECT_ID_STRATEGY_MAP, DIALECT_LOGICAL_TYPE_MAP, DIALECT_VECTOR_SUPPORT, type DatabaseCapabilities, DatabaseContext, type DatabaseContextOptions, type DatabaseDriverName, DatabaseError, type DatabaseLogger, type DatabaseOperationOptions, type DefineModelOptions, type DeleteQueryPlan, type Dialect, type DriverAdapter, type DriverExecutionResult, type DriverQueryResult, type DropColumnOperation, type DropForeignKeyOperation, type DropIndexOperation, type DropTableOperation, type DynamicRelationResolver, Entity, type EntityWithLoaded, Factory, type FactoryAttributes, type FactoryContext, type FactoryDefinition, type FactoryHook, type FactoryModelReference, FactoryService, type FactoryStateDefinition, type ForeignKeyReference, type GeneratedMigrationTemplate, type GeneratedSchemaTable, type GeneratedSchemaTableName, type GeneratedSchemaTables, HasSnowflakes, HasUlids, HasUniqueIds, HasUuids, type HoloProjectConfig, type HoloProjectConnectionConfig, type HoloProjectDatabaseConfig, type HoloProjectPaths, HydrationError, type IdGenerationStrategy, type InferInsert, type InferSelect, type InferUpdate, type InsertQueryPlan, type IntrospectedColumn, type IntrospectedForeignKey, type IntrospectedIndex, type LogicalColumnKind, type MigrateOptions, type MigrationContext, type MigrationDefinition, type MigrationErrorLog, type MigrationExecutionPolicy, MigrationService, type MigrationSquashPlan, type MigrationStartLog, type MigrationStatus, type MigrationSuccessLog, type MigrationTemplateKind, type MigrationTemplateOptions, type ModelAttributeKey, type ModelCollection, type ModelDefinition, ModelEventService, type ModelInsertPayload, ModelNotFoundException, ModelQueryBuilder, type ModelRecord, type ModelReference, ModelRegistry, ModelRepository, type ModelScopeArgs, type ModelScopeMap, type ModelTrait, type ModelUpdatePayload, MySQLAdapter, type MySQLAdapterOptions, type MySQLClientLike, type MySQLPoolLike, MySQLQueryCompiler, type MySQLQueryableLike, MySQLSchemaCompiler, type NormalizedHoloProjectConfig, type PaginatedResult, type PaginationMeta, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientLike, type PostgresPoolLike, PostgresQueryCompiler, type PostgresQueryableLike, PostgresSchemaCompiler, type QueryDirection, type QueryOperator, type QueryOrderBy, type QueryPlan, type QueryPredicate, QueryScheduler, type QuerySelection, type QuerySource, type RelationDefinition, RelationError, type RelationMap, type RenameColumnOperation, type RenameIndexOperation, type RenameTableOperation, type ResolveEagerLoadPath, type ResolveEagerLoadUnion, type ResolveEagerLoads, type RollbackOptions, type RuntimeConfigInput, type RuntimeConnectionConfig, type RuntimeDatabaseConfig, type RuntimeHoloConfig, SQLQueryCompiler, SQLSchemaCompiler, SQLiteAdapter, type SQLiteAdapterOptions, type SQLiteDatabaseLike, SQLiteQueryCompiler, SQLiteSchemaCompiler, type SQLiteStatementLike, type SchemaColumnMismatch, type SchemaDefaultDialectName, type SchemaDialectName, type SchemaDiff, SchemaError, type SchemaForeignKeyMismatch, type SchemaIndexMismatch, SchemaRegistry, SchemaService, type SchemaSyncPlan, SecurityError, type SecurityPolicy, type SeedOptions, type SeederContext, type SeederDefinition, type SeederErrorLog, SeederService, type SeederStartLog, type SeederSuccessLog, type SelectQueryPlan, SerializationError, type SerializedEntityWithLoaded, type SimplePaginatedResult, type SimplePaginationMeta, type SupportedDatabaseDriver, type TableColumnsShape, type TableDefinition, TableDefinitionBuilder, type TableIndexDefinition, TableMutationBuilder, TableQueryBuilder, type TableSchemaDiff, type TransactionCallback, TransactionError, type UniqueIdRuntimeConfig, type UniqueIdTrait, type UniqueIdTraitKind, type UnsafeStatement, type UpdateQueryPlan, type VectorValue, addColumnOperation, alterColumnOperation, belongsTo, belongsToMany, binaryCast, clearGeneratedTables, column, compileDialectDefaultLiteral, configureDB, connectionAsyncContext, createAdapter, createCapabilities, createConnectionManager, createCursorPaginator, createDatabase, createDeleteQueryPlan, createDialect, createFactoryService, createForeignKeyOperation, createIndexOperation, createInsertQueryPlan, createMigrationFileName, createMigrationService, createMigrationTimestamp, createModelCollection, createModelEventService, createModelRegistry, createMySQLAdapter, createPaginator, createPostgresAdapter, createQueryScheduler, createRuntimeConnectionOptions, createRuntimeLogger, createSQLiteAdapter, diffSchema as createSchemaDiff, createSchemaRegistry, createSchemaService, createSecurityPolicy, createSeederService, createSelectQueryPlan, createSimplePaginator, createTableOperation, createTableSource, createUpdateQueryPlan, defineFactory, defineGeneratedTable, defineHoloProject, defineMigration, defineModel, defineSeeder, diffSchema, dropColumnOperation, dropForeignKeyOperation, dropIndexOperation, dropTableOperation, encryptedCast, enumCast, generateMigrationTemplate, generateSnowflake, generateUlid, generateUuidV7, getGeneratedTableDefinition, getModelDefinition, hasMany, hasManyThrough, hasOne, hasOneThrough, inferMigrationTableName, inferMigrationTemplateKind, isSupportedDatabaseDriver, latestMorphOne, latestOfMany, listGeneratedTableDefinitions, morphMany, morphOfMany, morphOne, morphTo, morphToMany, morphedByMany, normalizeDialectReadValue, normalizeDialectWriteValue, normalizeHoloProjectConfig, normalizeMigrationSlug, ofMany, oldestMorphOne, oldestOfMany, parseDatabaseDriver, redactBindings, redactSql, registerGeneratedTables, renameColumnOperation, renameIndexOperation, renameTableOperation, renderGeneratedSchemaModule, renderGeneratedSchemaPlaceholder, resetDB, resetMorphRegistry, resolveDialectColumnType, resolveDialectIdStrategyType, resolveGeneratedTableDefinition, resolveMorphModel, resolveRuntimeConnectionManagerOptions, scopeRelation, unsafeSql, validateQueryPlan, withLimit, withOffset, withOrderBy, withPredicate, withSelections };
|
|
3839
|
+
export { type AddColumnOperation, type AlterColumnOperation, type AnyColumnDefinition, AsyncConnectionContext, type BoundTableDefinition, CapabilityError, ColumnBuilder, type ColumnDefinition, type CompiledStatement, CompilerError, type ConcurrencyOptions, ConfigurationError, ConnectionManager, type ConnectionManagerOptions, type CreateForeignKeyOperation, type CreateIndexOperation, type CreateTableOperation, type CursorPaginatedResult, DB, type DDLOperation, type DDLStatement, DEFAULT_CAPABILITIES, DEFAULT_HOLO_PROJECT_PATHS, DEFAULT_SECURITY_POLICY, DIALECT_ID_STRATEGY_MAP, DIALECT_LOGICAL_TYPE_MAP, DIALECT_VECTOR_SUPPORT, type DatabaseCapabilities, DatabaseContext, type DatabaseContextOptions, type DatabaseDriverName, DatabaseError, type DatabaseLogger, type DatabaseOperationOptions, type DatabaseQueryCacheBridge, type DefineModelOptions, type DefineTableOptions, type DeleteQueryPlan, type Dialect, type DriverAdapter, type DriverExecutionResult, type DriverQueryResult, type DropColumnOperation, type DropForeignKeyOperation, type DropIndexOperation, type DropTableOperation, type DynamicRelationResolver, Entity, type EntityWithLoaded, Factory, type FactoryAttributes, type FactoryContext, type FactoryDefinition, type FactoryHook, type FactoryModelReference, FactoryService, type FactoryStateDefinition, type ForeignKeyReference, type GeneratedMigrationTemplate, type GeneratedSchemaTable, type GeneratedSchemaTableName, type GeneratedSchemaTables, HasSnowflakes, HasUlids, HasUniqueIds, HasUuids, type HoloProjectConfig, type HoloProjectConnectionConfig, type HoloProjectDatabaseConfig, type HoloProjectPaths, HydrationError, type IdGenerationStrategy, type InferInsert, type InferSelect, type InferUpdate, type InsertQueryPlan, type IntrospectedColumn, type IntrospectedForeignKey, type IntrospectedIndex, type LogicalColumnKind, type MigrateOptions, type MigrationContext, type MigrationDefinition, type MigrationErrorLog, type MigrationExecutionPolicy, MigrationService, type MigrationSquashPlan, type MigrationStartLog, type MigrationStatus, type MigrationSuccessLog, type MigrationTemplateKind, type MigrationTemplateOptions, type ModelAttributeKey, type ModelCollection, type ModelDefinition, ModelEventService, type ModelInsertPayload, ModelNotFoundException, ModelQueryBuilder, type ModelRecord, type ModelReference, ModelRegistry, ModelRepository, type ModelScopeArgs, type ModelScopeMap, type ModelTrait, type ModelUpdatePayload, MySQLAdapter, type MySQLAdapterOptions, type MySQLClientLike, type MySQLPoolLike, MySQLQueryCompiler, type MySQLQueryableLike, MySQLSchemaCompiler, type NormalizedHoloProjectConfig, type PaginatedResult, type PaginationMeta, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientLike, type PostgresPoolLike, PostgresQueryCompiler, type PostgresQueryableLike, PostgresSchemaCompiler, type QueryCacheConfig, type QueryCacheFlexibleTtlInput, type QueryCacheTtlInput, type QueryDirection, type QueryOperator, type QueryOrderBy, type QueryPlan, type QueryPredicate, QueryScheduler, type QuerySelection, type QuerySource, type RelationDefinition, RelationError, type RelationMap, type RenameColumnOperation, type RenameIndexOperation, type RenameTableOperation, type ResolveEagerLoadPath, type ResolveEagerLoadUnion, type ResolveEagerLoads, type RollbackOptions, type RuntimeConfigInput, type RuntimeConnectionConfig, type RuntimeDatabaseConfig, type RuntimeHoloConfig, SQLQueryCompiler, SQLSchemaCompiler, SQLiteAdapter, type SQLiteAdapterOptions, type SQLiteDatabaseLike, SQLiteQueryCompiler, SQLiteSchemaCompiler, type SQLiteStatementLike, type SchemaColumnMismatch, type SchemaDefaultDialectName, type SchemaDialectName, type SchemaDiff, SchemaError, type SchemaForeignKeyMismatch, type SchemaIndexMismatch, SchemaRegistry, SchemaService, type SchemaSyncPlan, SecurityError, type SecurityPolicy, type SeedOptions, type SeederContext, type SeederDefinition, type SeederErrorLog, SeederService, type SeederStartLog, type SeederSuccessLog, type SelectQueryPlan, SerializationError, type SerializedEntityWithLoaded, type SimplePaginatedResult, type SimplePaginationMeta, type SupportedDatabaseDriver, type TableColumnsShape, type TableDefinition, TableDefinitionBuilder, type TableIndexDefinition, TableMutationBuilder, TableQueryBuilder, type TableSchemaDiff, type TransactionCallback, TransactionError, type UniqueIdRuntimeConfig, type UniqueIdTrait, type UniqueIdTraitKind, type UnsafeStatement, type UpdateQueryPlan, type VectorValue, addColumnOperation, alterColumnOperation, belongsTo, belongsToMany, binaryCast, clearGeneratedTables, column, compileDialectDefaultLiteral, configureDB, configureDatabaseQueryCacheBridge, connectionAsyncContext, createAdapter, createCapabilities, createConnectionManager, createCursorPaginator, createDatabase, createDeleteQueryPlan, createDialect, createFactoryService, createForeignKeyOperation, createIndexOperation, createInsertQueryPlan, createMigrationFileName, createMigrationService, createMigrationTimestamp, createModelCollection, createModelEventService, createModelRegistry, createMySQLAdapter, createPaginator, createPostgresAdapter, createQueryScheduler, createRuntimeConnectionOptions, createRuntimeLogger, createSQLiteAdapter, diffSchema as createSchemaDiff, createSchemaRegistry, createSchemaService, createSecurityPolicy, createSeederService, createSelectQueryPlan, createSimplePaginator, createTableOperation, createTableSource, createUpdateQueryPlan, defineFactory, defineGeneratedTable, defineHoloProject, defineMigration, defineModel, defineSeeder, diffSchema, dropColumnOperation, dropForeignKeyOperation, dropIndexOperation, dropTableOperation, encryptedCast, enumCast, generateMigrationTemplate, generateSnowflake, generateUlid, generateUuidV7, getDatabaseQueryCacheBridge, getGeneratedTableDefinition, getModelDefinition, hasMany, hasManyThrough, hasOne, hasOneThrough, inferMigrationTableName, inferMigrationTemplateKind, isSupportedDatabaseDriver, latestMorphOne, latestOfMany, listGeneratedTableDefinitions, morphMany, morphOfMany, morphOne, morphTo, morphToMany, morphedByMany, normalizeDialectReadValue, normalizeDialectWriteValue, normalizeHoloProjectConfig, normalizeMigrationSlug, ofMany, oldestMorphOne, oldestOfMany, parseDatabaseDriver, queryCacheInternals, redactBindings, redactSql, registerGeneratedTables, renameColumnOperation, renameIndexOperation, renameTableOperation, renderGeneratedSchemaModule, renderGeneratedSchemaPlaceholder, resetDB, resetDatabaseQueryCacheBridge, resetMorphRegistry, resolveDialectColumnType, resolveDialectIdStrategyType, resolveGeneratedTableDefinition, resolveMorphModel, resolveRuntimeConnectionManagerOptions, scopeRelation, unsafeSql, validateQueryPlan, withLimit, withOffset, withOrderBy, withPredicate, withSelections };
|