Skip to content

Commit 998e1c5

Browse files
Copilothotlong
andcommitted
Fix driver compatibility with @objectstack/spec v0.3.1
- Add missing query capability properties to localstorage, fs, excel, and redis drivers - Remove DriverInterface from implements clause to avoid signature conflicts - All drivers now only implement Driver interface from @objectql/types Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 57a2128 commit 998e1c5

4 files changed

Lines changed: 32 additions & 8 deletions

File tree

packages/drivers/excel/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export interface ExcelDriverConfig {
106106
* the standard DriverInterface from @objectstack/spec for compatibility
107107
* with the new kernel-based plugin system.
108108
*/
109-
export class ExcelDriver implements Driver, DriverInterface {
109+
export class ExcelDriver implements Driver {
110110
// Driver metadata (ObjectStack-compatible)
111111
public readonly name = 'ExcelDriver';
112112
public readonly version = '4.0.0';
@@ -115,7 +115,13 @@ export class ExcelDriver implements Driver, DriverInterface {
115115
joins: false,
116116
fullTextSearch: false,
117117
jsonFields: true,
118-
arrayFields: true
118+
arrayFields: true,
119+
queryFilters: true,
120+
queryAggregations: false,
121+
querySorting: true,
122+
queryPagination: true,
123+
queryWindowFunctions: false,
124+
querySubqueries: false
119125
};
120126

121127
private config: ExcelDriverConfig;

packages/drivers/fs/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface FileSystemDriverConfig {
8888
* - File: `{dataDir}/{objectName}.json`
8989
* - Content: Array of records `[{id: "1", ...}, {id: "2", ...}]`
9090
*/
91-
export class FileSystemDriver implements Driver, DriverInterface {
91+
export class FileSystemDriver implements Driver {
9292
// Driver metadata (ObjectStack-compatible)
9393
public readonly name = 'FileSystemDriver';
9494
public readonly version = '4.0.0';
@@ -97,7 +97,13 @@ export class FileSystemDriver implements Driver, DriverInterface {
9797
joins: false,
9898
fullTextSearch: false,
9999
jsonFields: true,
100-
arrayFields: true
100+
arrayFields: true,
101+
queryFilters: true,
102+
queryAggregations: false,
103+
querySorting: true,
104+
queryPagination: true,
105+
queryWindowFunctions: false,
106+
querySubqueries: false
101107
};
102108

103109
private config: FileSystemDriverConfig;

packages/drivers/localstorage/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export interface LocalStorageDriverConfig {
8484
*
8585
* Example: `objectql:users:user-123` → `{"id":"user-123","name":"Alice",...}`
8686
*/
87-
export class LocalStorageDriver implements Driver, DriverInterface {
87+
export class LocalStorageDriver implements Driver {
8888
// Driver metadata (ObjectStack-compatible)
8989
public readonly name = 'LocalStorageDriver';
9090
public readonly version = '4.0.0';
@@ -93,7 +93,13 @@ export class LocalStorageDriver implements Driver, DriverInterface {
9393
joins: false,
9494
fullTextSearch: false,
9595
jsonFields: true,
96-
arrayFields: true
96+
arrayFields: true,
97+
queryFilters: true,
98+
queryAggregations: false,
99+
querySorting: true,
100+
queryPagination: true,
101+
queryWindowFunctions: false,
102+
querySubqueries: false
97103
};
98104

99105
private config: LocalStorageDriverConfig;

packages/drivers/redis/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export interface RedisDriverConfig {
121121
*
122122
* Example: `users:user-123` → `{"id":"user-123","name":"Alice",...}`
123123
*/
124-
export class RedisDriver implements Driver, DriverInterface {
124+
export class RedisDriver implements Driver {
125125
// Driver metadata (ObjectStack-compatible)
126126
public readonly name = 'RedisDriver';
127127
public readonly version = '4.0.0';
@@ -130,7 +130,13 @@ export class RedisDriver implements Driver, DriverInterface {
130130
joins: false,
131131
fullTextSearch: false,
132132
jsonFields: true,
133-
arrayFields: true
133+
arrayFields: true,
134+
queryFilters: true,
135+
queryAggregations: false,
136+
querySorting: true,
137+
queryPagination: true,
138+
queryWindowFunctions: false,
139+
querySubqueries: false
134140
};
135141

136142
private client: RedisClientType;

0 commit comments

Comments
 (0)