@dbcube/core 5.1.4 → 5.1.10

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,384 +1,370 @@
1
1
  import { EventEmitter } from 'events';
2
2
 
3
- interface ResponseEngine {
4
- status: number;
5
- message: String;
6
- data: any;
3
+ export interface ResponseEngine {
4
+ status: number;
5
+ message: String;
6
+ data: any;
7
7
  }
8
-
9
- declare class Engine {
10
- private name;
11
- private config;
12
- private arguments;
13
- private binary;
14
- private timeout;
15
- constructor(name: string, timeout?: number);
16
- initializeBinary(): Promise<void>;
17
- setArguments(): any[];
18
- setConfig(name: string): {
19
- [x: string]: any;
20
- } | null;
21
- getConfig(): any;
22
- run(binary: string, args: []): Promise<ResponseEngine>;
8
+ export declare class Engine {
9
+ private name;
10
+ private config;
11
+ private arguments;
12
+ private binary;
13
+ private timeout;
14
+ constructor(name: string, timeout?: number);
15
+ initializeBinary(): Promise<void>;
16
+ setArguments(): any[];
17
+ setConfig(name: string): {
18
+ [x: string]: any;
19
+ } | null;
20
+ getConfig(): any;
21
+ run(binary: string, args: [
22
+ ]): Promise<ResponseEngine>;
23
23
  }
24
-
25
- declare class QueryEngine {
26
- private name;
27
- private config;
28
- private arguments;
29
- private binary;
30
- private timeout;
31
- private connectionId;
32
- private tcpPort;
33
- constructor(name: string, timeout?: number);
34
- private generatePort;
35
- private findAvailablePort;
36
- private isPortAvailable;
37
- initializeBinary(): Promise<void>;
38
- setArguments(): any[];
39
- setConfig(name: string): {
40
- [x: string]: any;
41
- } | null;
42
- getConfig(): any;
43
- run(binary: string, args: string[]): Promise<ResponseEngine>;
44
- private executeWithTcpServer;
45
- private waitForServerReady;
46
- private isServerResponding;
47
- private sleep;
48
- private getCachedDML;
49
- private startTcpServer;
50
- private sendTcpRequestFast;
51
- private processQueue;
52
- private createNewConnection;
53
- private executeOnConnection;
54
- private createProcess;
55
- disconnect(): Promise<ResponseEngine>;
24
+ export declare class QueryEngine {
25
+ private name;
26
+ private config;
27
+ private arguments;
28
+ private binary;
29
+ private timeout;
30
+ private connectionId;
31
+ private tcpPort;
32
+ constructor(name: string, timeout?: number);
33
+ private generatePort;
34
+ private findAvailablePort;
35
+ private isPortAvailable;
36
+ initializeBinary(): Promise<void>;
37
+ setArguments(): any[];
38
+ setConfig(name: string): {
39
+ [x: string]: any;
40
+ } | null;
41
+ getConfig(): any;
42
+ run(binary: string, args: string[]): Promise<ResponseEngine>;
43
+ private executeWithTcpServer;
44
+ private waitForServerReady;
45
+ private isServerResponding;
46
+ private sleep;
47
+ private getCachedDML;
48
+ private startTcpServer;
49
+ private sendTcpRequestFast;
50
+ private processQueue;
51
+ private createNewConnection;
52
+ private executeOnConnection;
53
+ private createProcess;
54
+ disconnect(): Promise<ResponseEngine>;
56
55
  }
57
-
58
- interface SystemInfo {
59
- platform: string;
60
- arch: string;
61
- release: string;
62
- type: string;
63
- endianness: string;
64
- cpus: number;
56
+ export interface SystemInfo {
57
+ platform: string;
58
+ arch: string;
59
+ release: string;
60
+ type: string;
61
+ endianness: string;
62
+ cpus: number;
65
63
  }
66
- declare class Arquitecture {
67
- private systemInfo;
68
- constructor();
69
- /**
70
- * Detecta información completa del sistema
71
- */
72
- private detectSystemInfo;
73
- /**
74
- * Obtiene la plataforma normalizada
75
- */
76
- getPlatform(): string;
77
- /**
78
- * Obtiene la arquitectura normalizada
79
- */
80
- getArchitecture(): string;
81
- /**
82
- * Genera el nombre del binario basado en la arquitectura
83
- */
84
- getBinaryName(baseName: string): string;
85
- /**
86
- * Obtiene información completa del sistema
87
- */
88
- getSystemInfo(): SystemInfo;
89
- /**
90
- * Obtiene el triple de destino (target triple) para Rust
91
- */
92
- getRustTargetTriple(): string;
93
- /**
94
- * Muestra información detallada del sistema
95
- */
96
- printSystemInfo(): void;
64
+ export declare class Arquitecture {
65
+ private systemInfo;
66
+ constructor();
67
+ /**
68
+ * Detecta información completa del sistema
69
+ */
70
+ private detectSystemInfo;
71
+ /**
72
+ * Obtiene la plataforma normalizada
73
+ */
74
+ getPlatform(): string;
75
+ /**
76
+ * Obtiene la arquitectura normalizada
77
+ */
78
+ getArchitecture(): string;
79
+ /**
80
+ * Genera el nombre del binario basado en la arquitectura
81
+ */
82
+ getBinaryName(baseName: string): string;
83
+ /**
84
+ * Obtiene información completa del sistema
85
+ */
86
+ getSystemInfo(): SystemInfo;
87
+ /**
88
+ * Obtiene el triple de destino (target triple) para Rust
89
+ */
90
+ getRustTargetTriple(): string;
91
+ /**
92
+ * Muestra información detallada del sistema
93
+ */
94
+ printSystemInfo(): void;
97
95
  }
98
-
99
- interface BinaryType {
100
- query_engine: string;
101
- schema_engine: string;
96
+ interface BinaryType$1 {
97
+ query_engine: string;
98
+ schema_engine: string;
102
99
  }
103
-
104
- declare class Binary {
105
- private static isDownloading;
106
- private static downloadPromise;
107
- private static cachedBinaries;
108
- static ensureBinariesExist(): Promise<void>;
109
- private static downloadBinaries;
110
- private static getBinDir;
111
- private static findVersionedBinary;
112
- static get(): Promise<BinaryType>;
100
+ export declare class Binary {
101
+ private static isDownloading;
102
+ private static downloadPromise;
103
+ private static cachedBinaries;
104
+ static ensureBinariesExist(): Promise<void>;
105
+ private static downloadBinaries;
106
+ private static getBinDir;
107
+ private static findVersionedBinary;
108
+ static get(): Promise<BinaryType$1>;
113
109
  }
114
-
115
- interface SqliteResult {
116
- status: 'success' | 'error';
117
- message: string;
118
- data: any | null;
110
+ export interface SqliteResult {
111
+ status: "success" | "error";
112
+ message: string;
113
+ data: any | null;
119
114
  }
120
- interface RunResult {
121
- changes: number;
122
- lastID: number;
115
+ export interface RunResult {
116
+ changes: number;
117
+ lastID: number;
123
118
  }
124
119
  declare class SqliteExecutor {
125
- private binaryPath;
126
- private dbPath;
127
- constructor(dbPath: string);
128
- private findVersionedBinary;
129
- private getBinaryPath;
130
- private executeBinary;
131
- connect(): Promise<boolean>;
132
- exists(): Promise<boolean>;
133
- query(sql: string, params?: any[]): Promise<SqliteResult>;
134
- queryMultiple(sql: string): Promise<SqliteResult>;
135
- prepare(sql: string): {
136
- all: (...params: any[]) => Promise<any[]>;
137
- run: (...params: any[]) => Promise<RunResult>;
138
- };
139
- prepareSync(sql: string): {
140
- all: (...params: any[]) => any;
141
- run: (...params: any[]) => any;
142
- };
120
+ private binaryPath;
121
+ private dbPath;
122
+ constructor(dbPath: string);
123
+ private findVersionedBinary;
124
+ private getBinaryPath;
125
+ private executeBinary;
126
+ connect(): Promise<boolean>;
127
+ exists(): Promise<boolean>;
128
+ query(sql: string, params?: any[]): Promise<SqliteResult>;
129
+ queryMultiple(sql: string): Promise<SqliteResult>;
130
+ prepare(sql: string): {
131
+ all: (...params: any[]) => Promise<any[]>;
132
+ run: (...params: any[]) => Promise<RunResult>;
133
+ };
134
+ prepareSync(sql: string): {
135
+ all: (...params: any[]) => any;
136
+ run: (...params: any[]) => any;
137
+ };
143
138
  }
144
-
145
- interface DatabaseConfig$1 {
146
- name?: string;
147
- HOST?: string;
148
- USER?: string;
149
- PASSWORD?: string;
150
- DATABASE?: string;
151
- PORT?: number;
139
+ export interface DatabaseConfig {
140
+ name?: string;
141
+ HOST?: string;
142
+ USER?: string;
143
+ PASSWORD?: string;
144
+ DATABASE?: string;
145
+ PORT?: number;
152
146
  }
153
- interface QueryResult {
154
- status: 'success' | 'error';
155
- message: string;
156
- data: any | null;
147
+ export interface QueryResult {
148
+ status: "success" | "error";
149
+ message: string;
150
+ data: any | null;
157
151
  }
158
- interface ParametrizedQueryResult {
159
- query: string;
160
- parameters: any[];
152
+ export interface ParametrizedQueryResult {
153
+ query: string;
154
+ parameters: any[];
161
155
  }
162
156
  declare class SQLite {
163
- private executor;
164
- private database?;
165
- constructor(config: DatabaseConfig$1);
166
- ifExist(): Promise<Boolean>;
167
- connect(): Promise<SqliteExecutor>;
168
- disconnect(): Promise<void>;
169
- query(sqlQuery: string): Promise<QueryResult>;
170
- queryWithParameters(sqlQuery: string, params?: any[]): Promise<QueryResult>;
171
- convertToParameterizedQuery(sql: string): ParametrizedQueryResult;
157
+ private executor;
158
+ private database?;
159
+ constructor(config: DatabaseConfig);
160
+ ifExist(): Promise<Boolean>;
161
+ connect(): Promise<SqliteExecutor>;
162
+ disconnect(): Promise<void>;
163
+ query(sqlQuery: string): Promise<QueryResult>;
164
+ queryWithParameters(sqlQuery: string, params?: any[]): Promise<QueryResult>;
165
+ convertToParameterizedQuery(sql: string): ParametrizedQueryResult;
172
166
  }
173
- declare const DbConfig: SQLite;
174
-
175
- /**
176
- * Tipo para la configuración de una base de datos
177
- */
178
- type DatabaseConfig = Record<string, any>;
167
+ export declare const DbConfig: SQLite;
168
+ type DatabaseConfig$1 = Record<string, any>;
179
169
  /**
180
170
  * Tipo para la configuración general del ORM
181
171
  */
182
- interface ConfigData {
183
- [key: string]: any;
184
- databases?: Record<string, DatabaseConfig>;
172
+ export interface ConfigData {
173
+ [key: string]: any;
174
+ databases?: Record<string, DatabaseConfig$1>;
185
175
  }
186
176
  /**
187
177
  * Clase para manejar la configuración del ORM
188
178
  */
189
- declare class Config {
190
- private data;
191
- private databases;
192
- /**
193
- * Establece la configuración
194
- * @param configData - Datos de configuración
195
- */
196
- set(configData: ConfigData): void;
197
- /**
198
- * Obtiene un valor de configuración
199
- * @param key - Clave de configuración
200
- * @returns Valor de configuración
201
- */
202
- get<T = any>(key: string): T;
203
- /**
204
- * Obtiene la configuración de una base de datos específica
205
- * @param dbName - Nombre de la base de datos
206
- * @returns Configuración de la base de datos o null
207
- */
208
- getDatabase(dbName: string): DatabaseConfig | null;
209
- /**
210
- * Obtiene todas las bases de datos configuradas
211
- * @returns Todas las configuraciones de bases de datos
212
- */
213
- getAllDatabases(): Record<string, DatabaseConfig>;
179
+ export declare class Config {
180
+ private data;
181
+ private databases;
182
+ /**
183
+ * Establece la configuración
184
+ * @param configData - Datos de configuración
185
+ */
186
+ set(configData: ConfigData): void;
187
+ /**
188
+ * Obtiene un valor de configuración
189
+ * @param key - Clave de configuración
190
+ * @returns Valor de configuración
191
+ */
192
+ get<T = any>(key: string): T;
193
+ /**
194
+ * Obtiene la configuración de una base de datos específica
195
+ * @param dbName - Nombre de la base de datos
196
+ * @returns Configuración de la base de datos o null
197
+ */
198
+ getDatabase(dbName: string): DatabaseConfig$1 | null;
199
+ /**
200
+ * Obtiene todas las bases de datos configuradas
201
+ * @returns Todas las configuraciones de bases de datos
202
+ */
203
+ getAllDatabases(): Record<string, DatabaseConfig$1>;
214
204
  }
215
-
216
- interface InterceptOptions {
217
- interceptLog?: boolean;
218
- interceptError?: boolean;
219
- interceptWarn?: boolean;
220
- keepOriginal?: boolean;
221
- useBuffer?: boolean;
205
+ export interface InterceptOptions {
206
+ interceptLog?: boolean;
207
+ interceptError?: boolean;
208
+ interceptWarn?: boolean;
209
+ keepOriginal?: boolean;
210
+ useBuffer?: boolean;
222
211
  }
223
- interface ReadOptions {
224
- lines?: number | null;
225
- fromEnd?: boolean;
226
- asArray?: boolean;
212
+ export interface ReadOptions {
213
+ lines?: number | null;
214
+ fromEnd?: boolean;
215
+ asArray?: boolean;
227
216
  }
228
- interface WatchOptions {
229
- persistent?: boolean;
230
- interval?: number;
231
- fromEnd?: boolean;
217
+ export interface WatchOptions {
218
+ persistent?: boolean;
219
+ interval?: number;
220
+ fromEnd?: boolean;
232
221
  }
233
- interface WatchController {
234
- id: string;
235
- stop: () => void;
236
- isWatching: () => boolean;
222
+ export interface WatchController {
223
+ id: string;
224
+ stop: () => void;
225
+ isWatching: () => boolean;
237
226
  }
238
- interface InterceptController {
239
- restore: () => void;
240
- commit: () => Promise<boolean>;
241
- discard: () => number;
242
- hasBuffer: () => boolean;
243
- getBufferSize: () => number;
227
+ export interface InterceptController {
228
+ restore: () => void;
229
+ commit: () => Promise<boolean>;
230
+ discard: () => number;
231
+ hasBuffer: () => boolean;
232
+ getBufferSize: () => number;
244
233
  }
245
- interface DeleteResult {
246
- filePath: string;
247
- deleted: boolean;
248
- error: string | null;
234
+ export interface DeleteResult {
235
+ filePath: string;
236
+ deleted: boolean;
237
+ error: string | null;
249
238
  }
250
- type LogLevel = 'INFO' | 'ERROR' | 'WARN' | 'DEBUG';
251
- declare class FileLogger extends EventEmitter {
252
- private static watchers;
253
- private static buffers;
254
- /**
255
- * Escribe un log en el archivo especificado
256
- * @param filePath - Ruta del archivo de log
257
- * @param message - Mensaje a escribir
258
- * @param level - Nivel del log (INFO, ERROR, WARN, DEBUG)
259
- * @param append - Si debe agregar al final del archivo (default: true)
260
- */
261
- static write(filePath: string, message: string, level?: LogLevel, append?: boolean): Promise<boolean>;
262
- /**
263
- * Inicia un buffer temporal para un archivo de log
264
- * @param filePath - Ruta del archivo de log
265
- */
266
- static startBuffer(filePath: string): void;
267
- /**
268
- * Confirma y escribe todos los logs del buffer al archivo
269
- * @param filePath - Ruta del archivo de log
270
- */
271
- static commitBuffer(filePath: string): Promise<boolean>;
272
- /**
273
- * Descarta todos los logs del buffer sin escribirlos
274
- * @param filePath - Ruta del archivo de log
275
- */
276
- static discardBuffer(filePath: string): number;
277
- /**
278
- * Verifica si existe un buffer activo para un archivo
279
- * @param filePath - Ruta del archivo de log
280
- */
281
- static hasBuffer(filePath: string): boolean;
282
- /**
283
- * Obtiene el número de logs en el buffer
284
- * @param filePath - Ruta del archivo de log
285
- */
286
- static getBufferSize(filePath: string): number;
287
- /**
288
- * Intercepta console.log y console.error para escribir a archivo
289
- * @param filePath - Ruta del archivo de log
290
- * @param options - Opciones de interceptación
291
- */
292
- static interceptConsole(filePath: string, options?: InterceptOptions): InterceptController;
293
- /**
294
- * Lee el contenido completo del archivo de log
295
- * @param filePath - Ruta del archivo de log
296
- * @param options - Opciones de lectura
297
- * @returns Contenido del archivo
298
- */
299
- static read(filePath: string, options?: ReadOptions): Promise<string | string[]>;
300
- /**
301
- * Observa un archivo de log en tiempo real
302
- * @param filePath - Ruta del archivo de log
303
- * @param callback - Función callback para nuevas líneas
304
- * @param options - Opciones del watcher
305
- * @returns Objeto con métodos para controlar el watcher
306
- */
307
- static watch(filePath: string, callback: (line: string, filePath: string) => void, options?: WatchOptions): WatchController;
308
- /**
309
- * Detiene todos los watchers activos
310
- */
311
- static stopAllWatchers(): void;
312
- /**
313
- * Métodos de conveniencia para diferentes niveles de log
314
- */
315
- static info(filePath: string, message: string): Promise<boolean>;
316
- static error(filePath: string, message: string): Promise<boolean>;
317
- static warn(filePath: string, message: string): Promise<boolean>;
318
- static debug(filePath: string, message: string): Promise<boolean>;
319
- /**
320
- * Limpia logs antiguos
321
- * @param filePath - Ruta del archivo de log
322
- * @param maxLines - Máximo número de líneas a mantener
323
- */
324
- static cleanup(filePath: string, maxLines?: number): Promise<number>;
325
- /**
326
- * Elimina un archivo de log
327
- * @param filePath - Ruta del archivo de log a eliminar
328
- */
329
- static deleteLogFile(filePath: string): Promise<boolean>;
330
- /**
331
- * Elimina múltiples archivos de log
332
- * @param filePaths - Array de rutas de archivos de log a eliminar
333
- */
334
- static deleteLogFiles(filePaths: string[]): Promise<DeleteResult[]>;
239
+ export type LogLevel = "INFO" | "ERROR" | "WARN" | "DEBUG";
240
+ export declare class FileLogger extends EventEmitter {
241
+ private static watchers;
242
+ private static buffers;
243
+ /**
244
+ * Escribe un log en el archivo especificado
245
+ * @param filePath - Ruta del archivo de log
246
+ * @param message - Mensaje a escribir
247
+ * @param level - Nivel del log (INFO, ERROR, WARN, DEBUG)
248
+ * @param append - Si debe agregar al final del archivo (default: true)
249
+ */
250
+ static write(filePath: string, message: string, level?: LogLevel, append?: boolean): Promise<boolean>;
251
+ /**
252
+ * Inicia un buffer temporal para un archivo de log
253
+ * @param filePath - Ruta del archivo de log
254
+ */
255
+ static startBuffer(filePath: string): void;
256
+ /**
257
+ * Confirma y escribe todos los logs del buffer al archivo
258
+ * @param filePath - Ruta del archivo de log
259
+ */
260
+ static commitBuffer(filePath: string): Promise<boolean>;
261
+ /**
262
+ * Descarta todos los logs del buffer sin escribirlos
263
+ * @param filePath - Ruta del archivo de log
264
+ */
265
+ static discardBuffer(filePath: string): number;
266
+ /**
267
+ * Verifica si existe un buffer activo para un archivo
268
+ * @param filePath - Ruta del archivo de log
269
+ */
270
+ static hasBuffer(filePath: string): boolean;
271
+ /**
272
+ * Obtiene el número de logs en el buffer
273
+ * @param filePath - Ruta del archivo de log
274
+ */
275
+ static getBufferSize(filePath: string): number;
276
+ /**
277
+ * Intercepta console.log y console.error para escribir a archivo
278
+ * @param filePath - Ruta del archivo de log
279
+ * @param options - Opciones de interceptación
280
+ */
281
+ static interceptConsole(filePath: string, options?: InterceptOptions): InterceptController;
282
+ /**
283
+ * Lee el contenido completo del archivo de log
284
+ * @param filePath - Ruta del archivo de log
285
+ * @param options - Opciones de lectura
286
+ * @returns Contenido del archivo
287
+ */
288
+ static read(filePath: string, options?: ReadOptions): Promise<string | string[]>;
289
+ /**
290
+ * Observa un archivo de log en tiempo real
291
+ * @param filePath - Ruta del archivo de log
292
+ * @param callback - Función callback para nuevas líneas
293
+ * @param options - Opciones del watcher
294
+ * @returns Objeto con métodos para controlar el watcher
295
+ */
296
+ static watch(filePath: string, callback: (line: string, filePath: string) => void, options?: WatchOptions): WatchController;
297
+ /**
298
+ * Detiene todos los watchers activos
299
+ */
300
+ static stopAllWatchers(): void;
301
+ /**
302
+ * Métodos de conveniencia para diferentes niveles de log
303
+ */
304
+ static info(filePath: string, message: string): Promise<boolean>;
305
+ static error(filePath: string, message: string): Promise<boolean>;
306
+ static warn(filePath: string, message: string): Promise<boolean>;
307
+ static debug(filePath: string, message: string): Promise<boolean>;
308
+ /**
309
+ * Limpia logs antiguos
310
+ * @param filePath - Ruta del archivo de log
311
+ * @param maxLines - Máximo número de líneas a mantener
312
+ */
313
+ static cleanup(filePath: string, maxLines?: number): Promise<number>;
314
+ /**
315
+ * Elimina un archivo de log
316
+ * @param filePath - Ruta del archivo de log a eliminar
317
+ */
318
+ static deleteLogFile(filePath: string): Promise<boolean>;
319
+ /**
320
+ * Elimina múltiples archivos de log
321
+ * @param filePaths - Array de rutas de archivos de log a eliminar
322
+ */
323
+ static deleteLogFiles(filePaths: string[]): Promise<DeleteResult[]>;
335
324
  }
336
-
337
- interface DataObject {
338
- [key: string]: any;
325
+ export interface DataObject {
326
+ [key: string]: any;
339
327
  }
340
- interface ComputedFieldConfig {
341
- id: number;
342
- table_ref: string;
343
- column: string;
344
- type: 'string' | 'number' | 'boolean' | 'date' | 'object';
345
- instruction: string;
346
- database_ref: string;
347
- created_at: string;
348
- updated_at: string;
328
+ export interface ComputedFieldConfig {
329
+ id: number;
330
+ table_ref: string;
331
+ column: string;
332
+ type: "string" | "number" | "boolean" | "date" | "object";
333
+ instruction: string;
334
+ database_ref: string;
335
+ created_at: string;
336
+ updated_at: string;
349
337
  }
350
-
351
- type DatabaseType = 'mysql' | 'sqlite' | 'postgres' | 'mongodb';
352
-
353
- declare class ComputedFieldProcessor {
354
- static getComputedFields(name: string): Promise<any[]>;
355
- /**
356
- * Processes computed field instruction and returns the computed value
357
- * @param instruction - The @compute instruction
358
- * @param rowData - The row data containing column values
359
- * @returns The computed value or null if there's an error
360
- */
361
- static processInstruction(instruction: string, rowData: Record<string, any>): any;
362
- /**
363
- * Extracts column dependencies from a computed field instruction
364
- * @param instruction - The @compute instruction
365
- * @returns Array of column names that this computed field depends on
366
- */
367
- static extractDependencies(instruction: string): string[];
368
- /**
369
- * Adds computed fields to an array of data objects based on configuration array
370
- * @param data - Array of data objects
371
- * @param computedConfigs - Array of computed field configurations
372
- * @returns Array with the new computed fields added
373
- */
374
- static computedFields<T extends DataObject>(data: T[], computedConfigs: ComputedFieldConfig[]): T[];
338
+ export type DatabaseType = "mysql" | "sqlite" | "postgres" | "mongodb";
339
+ export declare class ComputedFieldProcessor {
340
+ static getComputedFields(name: string): Promise<any[]>;
341
+ /**
342
+ * Processes computed field instruction and returns the computed value
343
+ * @param instruction - The @compute instruction
344
+ * @param rowData - The row data containing column values
345
+ * @returns The computed value or null if there's an error
346
+ */
347
+ static processInstruction(instruction: string, rowData: Record<string, any>): any;
348
+ /**
349
+ * Extracts column dependencies from a computed field instruction
350
+ * @param instruction - The @compute instruction
351
+ * @returns Array of column names that this computed field depends on
352
+ */
353
+ static extractDependencies(instruction: string): string[];
354
+ /**
355
+ * Adds computed fields to an array of data objects based on configuration array
356
+ * @param data - Array of data objects
357
+ * @param computedConfigs - Array of computed field configurations
358
+ * @returns Array with the new computed fields added
359
+ */
360
+ static computedFields<T extends DataObject>(data: T[], computedConfigs: ComputedFieldConfig[]): T[];
375
361
  }
376
- declare class TableProcessor {
377
- static generateAlterQueries(nowQuery: string, dbType: DatabaseType, tableName: string, database_ref: string): Promise<string[]>;
378
- static saveQuery(table_ref: string, database_ref: string, struct: string): Promise<void>;
362
+ export declare class TableProcessor {
363
+ static generateAlterQueries(nowQuery: string, dbType: DatabaseType, tableName: string, database_ref: string): Promise<string[]>;
364
+ static saveQuery(table_ref: string, database_ref: string, struct: string): Promise<void>;
379
365
  }
380
- declare class TriggerProcessor {
381
- static getTriggers(name: string): Promise<any[]>;
366
+ export declare class TriggerProcessor {
367
+ static getTriggers(name: string): Promise<any[]>;
382
368
  }
383
369
 
384
- export { Arquitecture, Binary, ComputedFieldProcessor, Config, DbConfig, Engine, FileLogger, type InterceptController, QueryEngine, TableProcessor, TriggerProcessor };
370
+ export {};