Skip to content

Commit f12ec40

Browse files
committed
Refactor driver module structure and add driver schemas
- Moved Driver exports to the System module in index.ts - Added driver capabilities and interface schemas in driver.zod.ts - Implemented MongoDB and PostgreSQL driver configuration schemas - Created comprehensive tests for driver capabilities and interface - Established a new driver test suite to validate CRUD and transaction operations
1 parent a97902f commit f12ec40

File tree

9 files changed

+9
-7
lines changed

9 files changed

+9
-7
lines changed

packages/driver-memory/src/memory-driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { QueryAST, QueryInput } from '@objectstack/spec/data';
2-
import { DriverInterface, DriverOptions } from '@objectstack/spec/driver';
2+
import { DriverInterface, DriverOptions } from '@objectstack/spec/system';
33

44
/**
55
* Example: In-Memory Driver

packages/objectql/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { QueryAST, HookContext } from '@objectstack/spec/data';
22
import { ObjectStackManifest } from '@objectstack/spec/system';
3-
import { DriverInterface, DriverOptions } from '@objectstack/spec/driver';
3+
import { DriverInterface, DriverOptions } from '@objectstack/spec/system';
44
import { SchemaRegistry } from './registry';
55

66
// Export Registry for consumers

packages/spec/src/driver/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/spec/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
// and establish clear boundaries between different protocol layers.
4545
export * as Shared from './shared';
4646
export * as Data from './data';
47-
export * as Driver from './driver';
47+
// Driver moved to System
48+
// export * as Driver from './driver';
4849
export * as Permission from './permission';
4950
export * as UI from './ui';
5051
export * as System from './system';
File renamed without changes.
File renamed without changes.

packages/spec/src/system/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,10 @@ export * from './logger.zod';
2020
export * from './context.zod';
2121
export * from './scoped-storage.zod';
2222
export * from './datasource.zod';
23+
24+
// Driver Protocol
25+
export * from './driver.zod';
26+
export * from './driver/mongo.zod';
27+
export * from './driver/postgres.zod';
2328
// Note: Auth, Identity, Policy, Role, Organization moved to @objectstack/spec/auth
2429
// Note: Territory moved to @objectstack/spec/permission

0 commit comments

Comments
 (0)