turbine-orm 0.21.0 → 0.22.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.
@@ -98,6 +98,14 @@ export interface QueryInterfaceOptions {
98
98
  _txScoped?: boolean;
99
99
  /** @internal Callback from TurbineClient for query event emission. */
100
100
  _onQuery?: (event: QueryEvent) => void;
101
+ /**
102
+ * @internal Factory that builds the per-table query interface. Defaults to
103
+ * `new QueryInterface` (the SQL path). Non-SQL backends (PowDB) supply a
104
+ * factory returning a structurally-compatible interface that generates their
105
+ * own query language instead of SQL. The SQL dialects never set this, so their
106
+ * `table()` behavior is byte-identical.
107
+ */
108
+ queryInterfaceFactory?: (pool: pg.Pool, table: string, schema: SchemaMetadata, middlewares: MiddlewareFn[], options: QueryInterfaceOptions) => QueryInterface<object>;
101
109
  }
102
110
  export declare class QueryInterface<T extends object, R extends object = {}> {
103
111
  private readonly pool;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbine-orm",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Postgres-native TypeScript ORM — runs on Neon, Vercel Postgres, Cloudflare, Supabase. Streaming cursors, typed errors, single-query nested relations. One dependency, no WASM engine",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,6 +29,11 @@
29
29
  "import": "./dist/mssql.js",
30
30
  "require": "./dist/cjs/mssql.js"
31
31
  },
32
+ "./powdb": {
33
+ "types": "./dist/powdb.d.ts",
34
+ "import": "./dist/powdb.js",
35
+ "require": "./dist/cjs/powdb.js"
36
+ },
32
37
  "./cli": {
33
38
  "types": "./dist/cli/config.d.ts",
34
39
  "import": "./dist/cli/config.js",
@@ -101,6 +106,8 @@
101
106
  "c8": "^11.0.0",
102
107
  "husky": "^9.1.7",
103
108
  "lint-staged": "^16.4.0",
109
+ "@zvndev/powdb-client": "^0.7.1",
110
+ "@zvndev/powdb-embedded": "^0.7.1",
104
111
  "mssql": "^11.0.1",
105
112
  "mysql2": "^3.22.5",
106
113
  "size-limit": "^12.1.0",
@@ -108,10 +115,18 @@
108
115
  "typescript": "^5.7.0"
109
116
  },
110
117
  "peerDependencies": {
118
+ "@zvndev/powdb-client": "^0.7.1",
119
+ "@zvndev/powdb-embedded": "^0.7.1",
111
120
  "mssql": "^10.0.0 || ^11.0.0",
112
121
  "mysql2": "^3.0.0"
113
122
  },
114
123
  "peerDependenciesMeta": {
124
+ "@zvndev/powdb-client": {
125
+ "optional": true
126
+ },
127
+ "@zvndev/powdb-embedded": {
128
+ "optional": true
129
+ },
115
130
  "mssql": {
116
131
  "optional": true
117
132
  },