1- import { Data , System as SystemSpec } from '@objectstack/spec' ;
1+ import { Data , System as _SystemSpec } from '@objectstack/spec' ;
22import { z } from 'zod' ;
3- import { QueryAST , SortNode } from '@objectql/types' ;
4- type DriverInterface = z . infer < typeof Data . DriverInterface > ;
3+ import { QueryAST } from '@objectql/types' ;
4+ type _DriverInterface = z . infer < typeof Data . DriverInterface > ;
55/**
66 * ObjectQL
77 * Copyright (c) 2026-present ObjectStack Inc.
@@ -181,7 +181,7 @@ export class MemoryDriver implements Driver {
181181 * Find multiple records matching the query criteria.
182182 * Supports filtering, sorting, pagination, and field projection using Mingo.
183183 */
184- async find ( objectName : string , query : any = { } , options ?: any ) : Promise < any [ ] > {
184+ async find ( objectName : string , query : any = { } , _options ?: any ) : Promise < any [ ] > {
185185 // Get all records for this object type
186186 const pattern = `${ objectName } :` ;
187187 let records : any [ ] = [ ] ;
@@ -245,7 +245,7 @@ export class MemoryDriver implements Driver {
245245 /**
246246 * Create a new record.
247247 */
248- async create ( objectName : string , data : any , options ?: any ) : Promise < any > {
248+ async create ( objectName : string , data : any , _options ?: any ) : Promise < any > {
249249 // Generate ID if not provided
250250 const id = data . id || this . generateId ( objectName ) ;
251251 const key = `${ objectName } :${ id } ` ;
@@ -278,7 +278,7 @@ export class MemoryDriver implements Driver {
278278 /**
279279 * Update an existing record.
280280 */
281- async update ( objectName : string , id : string | number , data : any , options ?: any ) : Promise < any > {
281+ async update ( objectName : string , id : string | number , data : any , _options ?: any ) : Promise < any > {
282282 const key = `${ objectName } :${ id } ` ;
283283 const existing = this . store . get ( key ) ;
284284
@@ -312,7 +312,7 @@ export class MemoryDriver implements Driver {
312312 /**
313313 * Delete a record.
314314 */
315- async delete ( objectName : string , id : string | number , options ?: any ) : Promise < any > {
315+ async delete ( objectName : string , id : string | number , _options ?: any ) : Promise < any > {
316316 const key = `${ objectName } :${ id } ` ;
317317 const deleted = this . store . delete ( key ) ;
318318
@@ -335,7 +335,7 @@ export class MemoryDriver implements Driver {
335335 /**
336336 * Count records matching filters using Mingo.
337337 */
338- async count ( objectName : string , filters : any , options ?: any ) : Promise < number > {
338+ async count ( objectName : string , filters : any , _options ?: any ) : Promise < number > {
339339 const pattern = `${ objectName } :` ;
340340
341341 // Extract where condition from query object if needed
@@ -371,7 +371,7 @@ export class MemoryDriver implements Driver {
371371 /**
372372 * Get distinct values for a field using Mingo.
373373 */
374- async distinct ( objectName : string , field : string , filters ?: any , options ?: any ) : Promise < any [ ] > {
374+ async distinct ( objectName : string , field : string , filters ?: any , _options ?: any ) : Promise < any [ ] > {
375375 const pattern = `${ objectName } :` ;
376376
377377 // Get all records for this object type
@@ -418,7 +418,7 @@ export class MemoryDriver implements Driver {
418418 /**
419419 * Update multiple records matching filters using Mingo.
420420 */
421- async updateMany ( objectName : string , filters : any , data : any , options ?: any ) : Promise < any > {
421+ async updateMany ( objectName : string , filters : any , data : any , _options ?: any ) : Promise < any > {
422422 const pattern = `${ objectName } :` ;
423423
424424 // Get all records for this object type
@@ -464,7 +464,7 @@ export class MemoryDriver implements Driver {
464464 /**
465465 * Delete multiple records matching filters using Mingo.
466466 */
467- async deleteMany ( objectName : string , filters : any , options ?: any ) : Promise < any > {
467+ async deleteMany ( objectName : string , filters : any , _options ?: any ) : Promise < any > {
468468 const pattern = `${ objectName } :` ;
469469
470470 // Get all records for this object type
@@ -550,7 +550,7 @@ export class MemoryDriver implements Driver {
550550 * { $group: { _id: null, avgPrice: { $avg: '$price' } } }
551551 * ]);
552552 */
553- async aggregate ( objectName : string , pipeline : any [ ] , options ?: any ) : Promise < any [ ] > {
553+ async aggregate ( objectName : string , pipeline : any [ ] , _options ?: any ) : Promise < any [ ] > {
554554 const pattern = `${ objectName } :` ;
555555
556556 // Get all records for this object type
@@ -675,7 +675,7 @@ export class MemoryDriver implements Driver {
675675 }
676676 }
677677 }
678- } catch ( error ) {
678+ } catch ( _error ) {
679679 // Error silently ignored
680680 }
681681
@@ -703,7 +703,7 @@ export class MemoryDriver implements Driver {
703703 } ;
704704
705705 fs . writeFileSync ( this . config . persistence . filePath , JSON . stringify ( data , null , 2 ) , 'utf8' ) ;
706- } catch ( error ) {
706+ } catch ( _error ) {
707707 // Error silently ignored
708708 }
709709 }
@@ -839,7 +839,7 @@ export class MemoryDriver implements Driver {
839839 }
840840
841841 // Process the filter array to build MongoDB query
842- const conditions : Record < string , any > [ ] = [ ] ;
842+ const _conditions : Record < string , any > [ ] = [ ] ;
843843 let currentLogic : 'and' | 'or' = 'and' ;
844844 const logicGroups : { logic : 'and' | 'or' , conditions : Record < string , any > [ ] } [ ] = [
845845 { logic : 'and' , conditions : [ ] }
@@ -1183,7 +1183,7 @@ export class MemoryDriver implements Driver {
11831183 * @param parameters - Command parameters
11841184 * @param options - Execution options
11851185 */
1186- async execute ( command : any , parameters ?: any [ ] , options ?: any ) : Promise < any > {
1186+ async execute ( _command : any , _parameters ?: any [ ] , _options ?: any ) : Promise < any > {
11871187 // For memory driver, this is primarily for compatibility
11881188 // We don't support raw SQL/commands
11891189 throw new ObjectQLError ( { code : 'DRIVER_UNSUPPORTED_OPERATION' , message : 'Memory driver does not support raw command execution. Use executeCommand() instead.' } ) ;
0 commit comments