@dbcube/core 5.2.1 → 5.2.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
@@ -141,28 +141,39 @@ export declare class QueryEngine {
141
141
  getConfig(): any;
142
142
  run(binary: string, args: string[]): Promise<ResponseEngine>;
143
143
  private argsToCommand;
144
+ /** El motor embebido (FFI) es el camino por defecto cuando la librería
145
+ * nativa está disponible; el daemon TCP queda como fallback y como modo
146
+ * multi-proceso explícito. */
147
+ private useEmbedded;
144
148
  /**
145
- * Executes a DML plan over the persistent TCP server.
149
+ * Executes a DML plan. Embedded engine when available (in-process FFI,
150
+ * no network hop); persistent TCP daemon otherwise.
146
151
  * Pass txId to run it inside an active transaction.
147
152
  */
148
153
  executeDml(dml: object, txId?: string): Promise<ResponseEngine>;
149
154
  /**
150
- * Executes raw SQL (or a MongoDB command document) with bound parameters
151
- * over the persistent TCP server.
155
+ * Atomic batch: N write plans inside one transaction with a single
156
+ * engine round-trip. Falls back to begin/ops/commit over the daemon
157
+ * when the embedded engine is not available.
158
+ */
159
+ executeBatch(ops: object[]): Promise<ResponseEngine>;
160
+ /**
161
+ * Executes raw SQL (or a MongoDB command document) with bound parameters.
152
162
  */
153
163
  rawQuery(query: string, params?: any[], txId?: string): Promise<ResponseEngine>;
154
- /** Starts a server-side transaction and returns its id. */
164
+ /** Starts a transaction and returns its id. */
155
165
  beginTransaction(): Promise<string>;
156
166
  commitTransaction(txId: string): Promise<void>;
157
167
  rollbackTransaction(txId: string): Promise<void>;
158
168
  private executeWithTcpServer;
169
+ private poolFor;
170
+ private acquireSocket;
171
+ private releaseSocket;
159
172
  private waitForServerReady;
160
173
  private isServerResponding;
161
174
  private sleep;
162
175
  private getCachedDML;
163
176
  private startTcpServer;
164
- private sendTcpRequestFast;
165
- private processQueue;
166
177
  private createNewConnection;
167
178
  private executeOnConnection;
168
179
  private createProcess;
package/dist/index.d.ts CHANGED
@@ -141,28 +141,39 @@ export declare class QueryEngine {
141
141
  getConfig(): any;
142
142
  run(binary: string, args: string[]): Promise<ResponseEngine>;
143
143
  private argsToCommand;
144
+ /** El motor embebido (FFI) es el camino por defecto cuando la librería
145
+ * nativa está disponible; el daemon TCP queda como fallback y como modo
146
+ * multi-proceso explícito. */
147
+ private useEmbedded;
144
148
  /**
145
- * Executes a DML plan over the persistent TCP server.
149
+ * Executes a DML plan. Embedded engine when available (in-process FFI,
150
+ * no network hop); persistent TCP daemon otherwise.
146
151
  * Pass txId to run it inside an active transaction.
147
152
  */
148
153
  executeDml(dml: object, txId?: string): Promise<ResponseEngine>;
149
154
  /**
150
- * Executes raw SQL (or a MongoDB command document) with bound parameters
151
- * over the persistent TCP server.
155
+ * Atomic batch: N write plans inside one transaction with a single
156
+ * engine round-trip. Falls back to begin/ops/commit over the daemon
157
+ * when the embedded engine is not available.
158
+ */
159
+ executeBatch(ops: object[]): Promise<ResponseEngine>;
160
+ /**
161
+ * Executes raw SQL (or a MongoDB command document) with bound parameters.
152
162
  */
153
163
  rawQuery(query: string, params?: any[], txId?: string): Promise<ResponseEngine>;
154
- /** Starts a server-side transaction and returns its id. */
164
+ /** Starts a transaction and returns its id. */
155
165
  beginTransaction(): Promise<string>;
156
166
  commitTransaction(txId: string): Promise<void>;
157
167
  rollbackTransaction(txId: string): Promise<void>;
158
168
  private executeWithTcpServer;
169
+ private poolFor;
170
+ private acquireSocket;
171
+ private releaseSocket;
159
172
  private waitForServerReady;
160
173
  private isServerResponding;
161
174
  private sleep;
162
175
  private getCachedDML;
163
176
  private startTcpServer;
164
- private sendTcpRequestFast;
165
- private processQueue;
166
177
  private createNewConnection;
167
178
  private executeOnConnection;
168
179
  private createProcess;