@blitznocode/blitz-orm 0.15.2 → 0.15.3

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,7 +1,7 @@
1
- import * as surrealdb from 'surrealdb';
2
- import { QueryParameters, ConnectionStatus } from 'surrealdb';
1
+ import { BoundQuery } from 'surrealdb';
3
2
  import { TypeDBDriver, TypeDBSession } from 'typedb-driver';
4
3
 
4
+ type ConnectionState = 'disconnected' | 'connecting' | 'retrying' | 'connected';
5
5
  type ConnectionConfig = {
6
6
  url: string;
7
7
  namespace: string;
@@ -10,22 +10,24 @@ type ConnectionConfig = {
10
10
  password: string;
11
11
  };
12
12
  type ReconnectConfig = {
13
+ enabled: boolean;
13
14
  attempts: number;
14
- retryDelay: number;
15
- retryDelayMax: number;
15
+ retryDelayMultiplier: number;
16
+ retryDelayJitter: number;
16
17
  };
17
18
  type SurrealClientOptions = {
18
- queryTimeoutMs?: number;
19
19
  reconnect?: Partial<ReconnectConfig>;
20
+ versionCheck?: boolean;
20
21
  };
21
22
  declare class SurrealClient {
22
23
  #private;
23
24
  constructor(config: ConnectionConfig, options?: SurrealClientOptions);
24
25
  connect(): Promise<void>;
25
26
  close(): Promise<void>;
26
- query<T>(...args: QueryParameters): Promise<T[]>;
27
- queryRaw(...args: QueryParameters): Promise<surrealdb.QueryResult<unknown>[]>;
28
- get status(): ConnectionStatus;
27
+ query<T>(query: string | BoundQuery, bindings?: Record<string, unknown>): Promise<T[]>;
28
+ get state(): ConnectionState;
29
+ get version(): string | null;
30
+ get latestError(): string;
29
31
  }
30
32
 
31
33
  type SurrealDBProviderConfig = {