hyperdb-wasm 0.0.27099-dev.wasm.g0a1be56f → 0.0.27104-dev.wasm.g006f36b4

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/api.d.ts CHANGED
@@ -72,10 +72,13 @@ export interface QueryInfo {
72
72
  readonly preExecutionMetrics: QueryMetrics | null;
73
73
  readonly executionMetrics: QueryMetrics | null;
74
74
  }
75
- export interface QueryResult<Result> {
76
- readonly result: Result;
75
+ export interface QueryOperation {
77
76
  readonly info: Promise<QueryInfo>;
78
77
  }
78
+ export interface QueryPromise<Result> extends Promise<Result>, QueryOperation {
79
+ }
80
+ export interface QueryStreamIPC extends AsyncIterable<Uint8Array>, QueryOperation {
81
+ }
79
82
  export declare class HyperDBError extends Error {
80
83
  readonly sqlState: string;
81
84
  readonly errorSource: HyperDBErrorSource;
@@ -110,14 +113,15 @@ export declare class HyperDBConnection {
110
113
  private closing;
111
114
  constructor(client: HyperDBClient, connection: number, onClose?: () => void);
112
115
  close(): Promise<void>;
113
- sendIPC(sql: string): QueryResult<AsyncIterable<Uint8Array>>;
114
- queryIPC(sql: string): QueryResult<Promise<Uint8Array>>;
115
- send<T extends TypeMap = {
116
+ queryStreamIPC(sql: string): QueryStreamIPC;
117
+ queryIPC(sql: string): QueryPromise<Uint8Array>;
118
+ queryStream<T extends TypeMap = {
116
119
  [key: string]: DataType;
117
- }>(sql: string): QueryResult<Promise<AsyncRecordBatchStreamReader<T>>>;
120
+ }>(sql: string): QueryPromise<AsyncRecordBatchStreamReader<T>>;
118
121
  query<T extends TypeMap = {
119
122
  [key: string]: DataType;
120
- }>(sql: string): QueryResult<Promise<Table<T>>>;
123
+ }>(sql: string): QueryPromise<Table<T>>;
124
+ execute(sql: string): QueryPromise<bigint | null>;
121
125
  insertArrowTable(table: Table, options: ArrowInsertOptions): Promise<void>;
122
126
  insertArrowIPCFromPath(path: string, options: ArrowInsertOptions): Promise<void>;
123
127
  private insertArrowIPCFromPathInternal;