turbine-orm 0.21.0 → 0.23.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/README.md +19 -2
- package/dist/cjs/client.js +11 -2
- package/dist/cjs/generate.js +4 -0
- package/dist/cjs/introspect.js +6 -0
- package/dist/cjs/powdb.js +865 -0
- package/dist/cjs/powql.js +1262 -0
- package/dist/cli/ui.d.ts +1 -1
- package/dist/client.js +11 -2
- package/dist/generate.js +4 -0
- package/dist/introspect.js +6 -0
- package/dist/powdb.d.ts +341 -0
- package/dist/powdb.js +816 -0
- package/dist/powql.d.ts +205 -0
- package/dist/powql.js +1226 -0
- package/dist/query/builder.d.ts +8 -0
- package/dist/schema.d.ts +10 -0
- package/package.json +16 -1
package/dist/query/builder.d.ts
CHANGED
|
@@ -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/dist/schema.d.ts
CHANGED
|
@@ -51,6 +51,16 @@ export interface ColumnMetadata {
|
|
|
51
51
|
nullable: boolean;
|
|
52
52
|
/** Whether the column has a DEFAULT, is serial, or is generated */
|
|
53
53
|
hasDefault: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the **database server** generates this column's value on insert —
|
|
56
|
+
* a `serial`/`BIGSERIAL` sequence, an `IDENTITY` column, or PowDB's `auto`
|
|
57
|
+
* modifier. This is a strict subset of {@link hasDefault} (a server-generated
|
|
58
|
+
* column always reports `hasDefault: true`), but unlike a client-side default
|
|
59
|
+
* expression (`gen_random_uuid()`, `now()`) the value is assigned by the
|
|
60
|
+
* engine, so Turbine must NOT synthesize one client-side and the PowDB DDL
|
|
61
|
+
* emits the `auto` modifier. Optional / defaults to `false` for back-compat.
|
|
62
|
+
*/
|
|
63
|
+
isGenerated?: boolean;
|
|
54
64
|
/** Whether this is an array column */
|
|
55
65
|
isArray: boolean;
|
|
56
66
|
/** Dialect-specific array/bulk-insert type token when needed. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbine-orm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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
|
},
|