File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1414 "license" : " MIT" ,
1515 "main" : " dist/index.js" ,
1616 "types" : " dist/index.d.ts" ,
17+ "files" : [
18+ " dist" ,
19+ " README.md" ,
20+ " CHANGELOG.md" ,
21+ " package.json"
22+ ],
1723 "scripts" : {
1824 "build" : " tsc" ,
1925 "test" : " jest"
Original file line number Diff line number Diff line change @@ -421,6 +421,13 @@ export class FileSystemDriver implements Driver {
421421
422422 /**
423423 * Apply filters to an array of records.
424+ *
425+ * Supports ObjectQL filter format with logical operators (AND/OR):
426+ * [
427+ * ['field', 'operator', value],
428+ * 'or',
429+ * ['field2', 'operator', value2]
430+ * ]
424431 */
425432 private applyFilters ( records : any [ ] , filters : any [ ] ) : any [ ] {
426433 if ( ! filters || filters . length === 0 ) {
@@ -463,7 +470,7 @@ export class FileSystemDriver implements Driver {
463470 }
464471
465472 let result = conditions [ 0 ] ;
466- for ( let i = 0 ; i < operators . length ; i ++ ) {
473+ for ( let i = 0 ; i < operators . length && i + 1 < conditions . length ; i ++ ) {
467474 const op = operators [ i ] ;
468475 const nextCondition = conditions [ i + 1 ] ;
469476
@@ -578,6 +585,8 @@ export class FileSystemDriver implements Driver {
578585
579586 /**
580587 * Generate a unique ID for a record.
588+ * Uses timestamp + counter for uniqueness.
589+ * Note: For production use with high-frequency writes, consider using crypto.randomUUID().
581590 */
582591 private generateId ( objectName : string ) : string {
583592 const counter = ( this . idCounters . get ( objectName ) || 0 ) + 1 ;
You can’t perform that action at this time.
0 commit comments