@blitznocode/blitz-orm 0.11.8 → 0.11.9

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.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TypeDBDriver, TypeDBSession } from 'typedb-driver';
2
- import { Surreal } from 'surrealdb';
2
+ import { QueryParameters, QueryResult } from 'surrealdb';
3
3
 
4
4
  interface TypeDBProvider extends CommonProvider {
5
5
  provider: 'typeDB';
@@ -17,6 +17,23 @@ type TypeDBHandles = Map<string, {
17
17
  session: TypeDBSession;
18
18
  }>;
19
19
 
20
+ declare class SurrealPool {
21
+ private queue;
22
+ private connections;
23
+ constructor(params: {
24
+ url: string;
25
+ username: string;
26
+ password: string;
27
+ namespace: string;
28
+ database: string;
29
+ totalConnections: number;
30
+ });
31
+ private dequeue;
32
+ private run;
33
+ query<T = unknown>(...args: QueryParameters): Promise<T[]>;
34
+ query_raw<T = unknown>(...args: QueryParameters): Promise<QueryResult<T>[]>;
35
+ }
36
+
20
37
  type SurrealDBProviderConfig = {
21
38
  linkMode: 'edges' | 'refs';
22
39
  };
@@ -29,7 +46,7 @@ interface SurrealDBProviderObject extends CommonProvider {
29
46
  password: string;
30
47
  }
31
48
  type SurrealDBHandles = Map<string, {
32
- client: Surreal;
49
+ client: SurrealPool;
33
50
  providerConfig: SurrealDBProviderConfig;
34
51
  }>;
35
52
 
@@ -718,4 +735,4 @@ declare class BormClient {
718
735
  close: () => Promise<void>;
719
736
  }
720
737
 
721
- export { type Action, type BQLField, type BQLFieldObj, type BQLMutation, type BQLMutationBlock, type BQLResponse, type BQLResponseMulti, type BQLResponseSingle, type BaseResponse, type BormConfig, type BormEntity, type BormField, type BormMetadata, type BormOperation, type BormRelation, type BormSchema, type BormTrigger, type Cardinality, type CommonProvider, type ContentType, type ContentTypeMapping, type DBConnector, type DBHandleKey, type DBHandles, type DataField, type DiscreteCardinality, type EnrichedAttributeQuery, type EnrichedBQLMutationBlock, type EnrichedBQLQuery, type EnrichedBormEntity, type EnrichedBormRelation, type EnrichedBormSchema, type EnrichedDataField, type EnrichedEntityQuery, type EnrichedFieldQuery, type EnrichedLinkField, type EnrichedLinkQuery, type EnrichedRelationQuery, type EnrichedRoleField, type EnrichedRoleQuery, type FilledBQLMutationBlock, type Filter, type FilterValue, type Hooks, type LinkField, type LinkedFieldWithThing, type MutationConfig, type NegativeFilter, type NodeFunctionParams, type ParsedBQLMutation, type Pipeline, type PipelineOperation, type PlayedBy, type PositiveFilter, type PreHook, type Provider, type QueryConfig, type RawBQLMutation, type RawBQLQuery, type Request, type RightType, type RoleField, type RootBQLMutationBlock, type Sorter, type TQLEntityMutation, type TQLRequest, type ThingType, type TransFormAction, type TypeDBClusterProvider, type TypeDBHandles, type TypeDBProvider, type TypeGen, type ValidateAction, type Validations, type WithBormMetadata, BormClient as default };
738
+ export { type Action, type AllDbHandles, type BQLField, type BQLFieldObj, type BQLMutation, type BQLMutationBlock, type BQLResponse, type BQLResponseMulti, type BQLResponseSingle, type BaseResponse, type BormConfig, type BormEntity, type BormField, type BormMetadata, type BormOperation, type BormRelation, type BormSchema, type BormTrigger, type Cardinality, type CommonProvider, type ContentType, type ContentTypeMapping, type DBConnector, type DBHandleKey, type DBHandles, type DataField, type DiscreteCardinality, type EnrichedAttributeQuery, type EnrichedBQLMutationBlock, type EnrichedBQLQuery, type EnrichedBormEntity, type EnrichedBormRelation, type EnrichedBormSchema, type EnrichedDataField, type EnrichedEntityQuery, type EnrichedFieldQuery, type EnrichedLinkField, type EnrichedLinkQuery, type EnrichedRelationQuery, type EnrichedRoleField, type EnrichedRoleQuery, type FilledBQLMutationBlock, type Filter, type FilterValue, type Hooks, type LinkField, type LinkedFieldWithThing, type MutationConfig, type NegativeFilter, type NodeFunctionParams, type ParsedBQLMutation, type Pipeline, type PipelineOperation, type PlayedBy, type PositiveFilter, type PreHook, type Provider, type QueryConfig, type RawBQLMutation, type RawBQLQuery, type Request, type RightType, type RoleField, type RootBQLMutationBlock, type Sorter, type TQLEntityMutation, type TQLRequest, type ThingType, type TransFormAction, type TypeDBClusterProvider, type TypeDBHandles, type TypeDBProvider, type TypeGen, type ValidateAction, type Validations, type WithBormMetadata, BormClient as default };