@objectstack/driver-memory 0.1.1 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @objectstack/driver-memory
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Initial release of ObjectStack Protocol & Specification packages
8
+
9
+ This is the first public release of the ObjectStack ecosystem, providing:
10
+
11
+ - Core protocol definitions and TypeScript types
12
+ - ObjectQL query language and runtime
13
+ - Memory driver for in-memory data storage
14
+ - Client library for interacting with ObjectStack
15
+ - Hono server plugin for REST API endpoints
16
+ - Complete JSON schema generation for all specifications
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+ - @objectstack/spec@0.2.0
22
+
3
23
  ## 0.1.1
4
24
 
5
25
  ### Patch Changes
@@ -11,6 +11,12 @@ export declare class InMemoryDriver implements DriverInterface {
11
11
  install(ctx: any): void;
12
12
  supports: {
13
13
  transactions: boolean;
14
+ queryFilters: boolean;
15
+ queryAggregations: boolean;
16
+ querySorting: boolean;
17
+ queryPagination: boolean;
18
+ queryWindowFunctions: boolean;
19
+ querySubqueries: boolean;
14
20
  joins: boolean;
15
21
  fullTextSearch: boolean;
16
22
  jsonFields: boolean;
@@ -12,11 +12,20 @@ class InMemoryDriver {
12
12
  this.name = 'in-memory-driver';
13
13
  this.version = '0.0.1';
14
14
  this.supports = {
15
+ // Transaction & Connection Management
15
16
  transactions: false,
16
- joins: false,
17
- fullTextSearch: false,
18
- jsonFields: true,
19
- arrayFields: true,
17
+ // Query Operations
18
+ queryFilters: false, // TODO: Not implemented - basic find() doesn't handle filters
19
+ queryAggregations: false, // TODO: Not implemented - count() only returns total
20
+ querySorting: false, // TODO: Not implemented - find() doesn't handle sorting
21
+ queryPagination: true, // Basic pagination via 'top' is implemented
22
+ queryWindowFunctions: false, // TODO: Not implemented
23
+ querySubqueries: false, // TODO: Not implemented
24
+ joins: false, // TODO: Not implemented
25
+ // Advanced Features
26
+ fullTextSearch: false, // TODO: Not implemented
27
+ jsonFields: true, // Native JS object support
28
+ arrayFields: true, // Native JS array support
20
29
  };
21
30
  /**
22
31
  * The "Database": A map of TableName -> Array of Records
@@ -68,6 +77,7 @@ class InMemoryDriver {
68
77
  }
69
78
  async create(object, data, options) {
70
79
  const table = this.getTable(object);
80
+ // COMPATIBILITY: Driver must return 'id' as string
71
81
  const newRecord = {
72
82
  id: this.generateId(),
73
83
  ...data,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@objectstack/driver-memory",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "In-Memory Driver for ObjectStack (Reference Implementation)",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "dependencies": {
8
- "@objectstack/spec": "0.1.2"
8
+ "@objectstack/spec": "0.2.0"
9
9
  },
10
10
  "devDependencies": {
11
11
  "typescript": "^5.0.0"
@@ -23,11 +23,22 @@ export class InMemoryDriver implements DriverInterface {
23
23
  }
24
24
 
25
25
  supports = {
26
+ // Transaction & Connection Management
26
27
  transactions: false,
27
- joins: false,
28
- fullTextSearch: false,
29
- jsonFields: true,
30
- arrayFields: true,
28
+
29
+ // Query Operations
30
+ queryFilters: false, // TODO: Not implemented - basic find() doesn't handle filters
31
+ queryAggregations: false, // TODO: Not implemented - count() only returns total
32
+ querySorting: false, // TODO: Not implemented - find() doesn't handle sorting
33
+ queryPagination: true, // Basic pagination via 'top' is implemented
34
+ queryWindowFunctions: false, // TODO: Not implemented
35
+ querySubqueries: false, // TODO: Not implemented
36
+ joins: false, // TODO: Not implemented
37
+
38
+ // Advanced Features
39
+ fullTextSearch: false, // TODO: Not implemented
40
+ jsonFields: true, // Native JS object support
41
+ arrayFields: true, // Native JS array support
31
42
  };
32
43
 
33
44
  /**
@@ -87,6 +98,7 @@ export class InMemoryDriver implements DriverInterface {
87
98
  async create(object: string, data: Record<string, any>, options?: DriverOptions) {
88
99
  const table = this.getTable(object);
89
100
 
101
+ // COMPATIBILITY: Driver must return 'id' as string
90
102
  const newRecord = {
91
103
  id: this.generateId(),
92
104
  ...data,