@forinda/kickjs-db 5.2.2 → 5.3.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/dist/devtools-events.d.mts +1 -1
- package/dist/devtools-events.mjs +1 -1
- package/dist/index.d.mts +206 -23
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/dist/pg.d.mts +1 -1
- package/dist/pg.mjs +2 -2
- package/dist/{types-Dc9RQGSf.d.mts → types-7Ko9gPCO.d.mts} +30 -2
- package/dist/types-7Ko9gPCO.d.mts.map +1 -0
- package/dist/{types-DlFKeljT.d.mts → types-BBdfnVt3.d.mts} +146 -3
- package/dist/types-BBdfnVt3.d.mts.map +1 -0
- package/dist/{types-Cxh6cDtw.mjs → types-CnjiG9ij.mjs} +2 -2
- package/dist/{types-Cxh6cDtw.mjs.map → types-CnjiG9ij.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/types-Dc9RQGSf.d.mts.map +0 -1
- package/dist/types-DlFKeljT.d.mts.map +0 -1
package/dist/pg.d.mts
CHANGED
package/dist/pg.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-db v5.
|
|
2
|
+
* @forinda/kickjs-db v5.3.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import{t as ColumnBuilder}from"./types-
|
|
11
|
+
import{t as ColumnBuilder}from"./types-CnjiG9ij.mjs";var PgEnumColumnBuilder=class extends ColumnBuilder{enumName;values;constructor(enumName,values){super(enumName),this.enumName=enumName,this.values=values}};function pgEnum(name,...values){return Object.assign(()=>new PgEnumColumnBuilder(name,values),{enumName:name,values})}function tsvector(){return new ColumnBuilder(`tsvector`)}function vector(dim){return new ColumnBuilder(dim===void 0?`vector`:`vector(${dim})`)}function citext(){return new ColumnBuilder(`citext`)}function money(){return new ColumnBuilder(`money`)}function inet(){return new ColumnBuilder(`inet`)}function cidr(){return new ColumnBuilder(`cidr`)}function xml(){return new ColumnBuilder(`xml`)}export{PgEnumColumnBuilder,cidr,citext,inet,money,pgEnum,tsvector,vector,xml};
|
|
12
12
|
//# sourceMappingURL=pg.mjs.map
|
|
@@ -43,12 +43,40 @@ interface EnumSnapshot {
|
|
|
43
43
|
/** Allowed values, in declaration order. PG preserves the order. */
|
|
44
44
|
values: readonly string[];
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolved relation graph attached as a sidecar on the snapshot.
|
|
48
|
+
* Lives on `SchemaSnapshot.relations` (optional). Keyed
|
|
49
|
+
* sourceTable → relationName → resolved entry. Consumed by the
|
|
50
|
+
* relational-query compiler in `packages/db/src/query/`. The
|
|
51
|
+
* migration pipeline does not read this field — relations are
|
|
52
|
+
* query-time sugar, not DDL.
|
|
53
|
+
*
|
|
54
|
+
* Shaped this way (rather than re-using the runtime `RelationsDecl`)
|
|
55
|
+
* so the snapshot stays JSON-serializable: no function thunks, no
|
|
56
|
+
* back-references to table objects.
|
|
57
|
+
*/
|
|
58
|
+
interface RelationSnapshot {
|
|
59
|
+
kind: 'one' | 'many';
|
|
60
|
+
/** Target table name. */
|
|
61
|
+
target: string;
|
|
62
|
+
/** Columns on the source table that participate in the join. */
|
|
63
|
+
sourceColumns: readonly string[];
|
|
64
|
+
/** Columns on the target table that participate in the join. */
|
|
65
|
+
targetColumns: readonly string[];
|
|
66
|
+
}
|
|
46
67
|
interface SchemaSnapshot {
|
|
47
68
|
version: 1;
|
|
48
69
|
dialect: Dialect;
|
|
49
70
|
tables: Record<string, TableSnapshot>;
|
|
50
71
|
/** ENUM types declared via `pgEnum()`. PG-only; absent on other dialects. */
|
|
51
72
|
enums?: Record<string, EnumSnapshot>;
|
|
73
|
+
/**
|
|
74
|
+
* Optional relation sidecar populated when the schema includes
|
|
75
|
+
* `relations()` declarations. Absent when no relations are
|
|
76
|
+
* declared so M0/M1 callers see the same snapshot shape they
|
|
77
|
+
* always did.
|
|
78
|
+
*/
|
|
79
|
+
relations?: Record<string, Record<string, RelationSnapshot>>;
|
|
52
80
|
}
|
|
53
81
|
//#endregion
|
|
54
82
|
//#region src/dsl/columns/types.d.ts
|
|
@@ -158,5 +186,5 @@ declare class ColumnBuilder<T = unknown> {
|
|
|
158
186
|
__state(): Readonly<ColumnState>;
|
|
159
187
|
}
|
|
160
188
|
//#endregion
|
|
161
|
-
export {
|
|
162
|
-
//# sourceMappingURL=types-
|
|
189
|
+
export { SchemaSnapshot as _, GeneratedBrand as a, NotNullBrand as c, Dialect as d, EnumSnapshot as f, RelationSnapshot as g, IndexSnapshot as h, FkSpec as i, CheckSnapshot as l, ForeignKeySnapshot as m, ColumnRef as n, KICK_GENERATED as o, FkAction as p, ColumnState as r, KICK_NOT_NULL as s, ColumnBuilder as t, ColumnSnapshot as u, TableSnapshot as v };
|
|
190
|
+
//# sourceMappingURL=types-7Ko9gPCO.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-7Ko9gPCO.d.mts","names":[],"sources":["../src/snapshot/types.ts","../src/dsl/columns/types.ts"],"mappings":";;KAAY,OAAA;AAAA,KAEA,QAAA;AAAA,UAEK,cAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,OAAA;EACA,UAAA;AAAA;AAAA,UAGe,aAAA;EACf,IAAA;EACA,OAAA;EACA,MAAA;AAAA;AAAA,UAGe,kBAAA;EACf,IAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,QAAA,EAAU,QAAA;EACV,QAAA,EAAU,QAAA;AAAA;AAAA,UAGK,aAAA;EACf,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,aAAA;EACf,IAAA;EACA,OAAA,EAAS,MAAA,SAAe,cAAA;EACxB,OAAA,EAAS,aAAA;EACT,WAAA,EAA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d,IAAA;IAAQ,QAAA,GAAW,QAAA;IAAU,QAAA,GAAW,QAAA;EAAA;ED3C9B;;;;;EC4DZ,OAAA,CAAQ,KAAA,kBAAuB,cAAA;EAK/B,MAAA,CAAO,IAAA,WAAe,cAAA;EAWtB,OAAA,CAAA,GAAW,QAAA,CAAS,WAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import * as _$kysely from "kysely";
|
|
3
|
-
import { Dialect, Kysely } from "kysely";
|
|
3
|
+
import { Dialect, Expression, ExpressionBuilder, Kysely } from "kysely";
|
|
4
4
|
import * as _$_forinda_kickjs_devtools_kit_bus0 from "@forinda/kickjs-devtools-kit/bus";
|
|
5
5
|
|
|
6
6
|
//#region src/extend/types.d.ts
|
|
@@ -103,6 +103,136 @@ type RegisteredDB = KickDbRegister extends {
|
|
|
103
103
|
qb: _$kysely.Kysely<infer X>;
|
|
104
104
|
} ? X : unknown : unknown;
|
|
105
105
|
//#endregion
|
|
106
|
+
//#region src/query/types.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* Adopter-augmented at typegen time, mirroring `KickDbRegister`. The
|
|
109
|
+
* augmentation slots a record keyed by table name; each value is a
|
|
110
|
+
* record of `{ relationName: RelationMapEntry }`. The kick/db typegen
|
|
111
|
+
* plugin emits this alongside the column-shape augmentation.
|
|
112
|
+
*
|
|
113
|
+
* declare module '@forinda/kickjs-db' {
|
|
114
|
+
* interface KickDbRelationsRegister {
|
|
115
|
+
* db: {
|
|
116
|
+
* users: { posts: { kind: 'many'; target: 'posts' } }
|
|
117
|
+
* posts: { author: { kind: 'one'; target: 'users' }, comments: { kind: 'many'; target: 'comments' } }
|
|
118
|
+
* comments: { post: { kind: 'one'; target: 'posts' } }
|
|
119
|
+
* }
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
*/
|
|
123
|
+
interface KickDbRelationsRegister {}
|
|
124
|
+
/**
|
|
125
|
+
* One relation entry in the registry — kind (`'one'` or `'many'`) +
|
|
126
|
+
* the target table name. The target is a plain string key so the
|
|
127
|
+
* registry stays decoupled from any particular `DB` generic; the
|
|
128
|
+
* compile-time check that `target` lives in the local `DB` happens
|
|
129
|
+
* inside `WithClause`.
|
|
130
|
+
*/
|
|
131
|
+
interface RelationMapEntry {
|
|
132
|
+
kind: 'one' | 'many';
|
|
133
|
+
target: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The full registered relation graph. Falls back to an open-shaped
|
|
137
|
+
* record when the adopter hasn't augmented `KickDbRelationsRegister`,
|
|
138
|
+
* preserving the M1-permissive baseline.
|
|
139
|
+
*/
|
|
140
|
+
type RegisteredRelations = KickDbRelationsRegister extends {
|
|
141
|
+
db: infer R;
|
|
142
|
+
} ? R extends Record<string, Record<string, RelationMapEntry>> ? R : Record<string, Record<string, RelationMapEntry>> : Record<string, Record<string, RelationMapEntry>>;
|
|
143
|
+
/**
|
|
144
|
+
* Pull the relation map for `Table`. Returns an empty record when the
|
|
145
|
+
* table has no declared relations (or no augmentation present at all),
|
|
146
|
+
* which makes `with` resolve to `Record<string, never>` — i.e. typing
|
|
147
|
+
* a `with: { ... }` becomes a compile error per key.
|
|
148
|
+
*/
|
|
149
|
+
type TableRelations<Table extends string> = Table extends keyof RegisteredRelations ? RegisteredRelations[Table] extends Record<string, RelationMapEntry> ? RegisteredRelations[Table] : Record<string, never> : Record<string, never>;
|
|
150
|
+
/**
|
|
151
|
+
* Kysely's `ExpressionBuilder` exposed verbatim as the second arg
|
|
152
|
+
* to `where` / `orderBy` callbacks. Adopters use the callable form:
|
|
153
|
+
*
|
|
154
|
+
* where: (_u, eb) => eb('isActive', '=', true)
|
|
155
|
+
* orderBy: (_u, eb) => eb.ref('createdAt')
|
|
156
|
+
*
|
|
157
|
+
* Helpers like `eb.and(...)`, `eb.or(...)`, `eb.ref('col')`,
|
|
158
|
+
* `eb.fn.count(...)` are Kysely's standard surface. There is no
|
|
159
|
+
* `eb.eq` — that's the callable form. There is no `eb.desc` —
|
|
160
|
+
* order direction lands as a separate Kysely call (e.g. wrap the
|
|
161
|
+
* ref expression in `sql\`... desc\``) when needed in v1.
|
|
162
|
+
*/
|
|
163
|
+
type QueryOps<DB, Table extends keyof DB & string> = ExpressionBuilder<DB, Table>;
|
|
164
|
+
/**
|
|
165
|
+
* The table-bound shape passed as the first arg to callbacks. The
|
|
166
|
+
* declared shape is `DB[Table]`, so `u.id` resolves to the row
|
|
167
|
+
* field's TS type at compile time — handy for type-narrowing in
|
|
168
|
+
* adapter-side helpers. At runtime, the same `u` is a Proxy whose
|
|
169
|
+
* property reads return Kysely column refs (`eb.ref('users.id')`),
|
|
170
|
+
* so `eb('id', '=', u.id)` Just Works for either layer-1 or
|
|
171
|
+
* relational-query call sites. Most adopters keep the first arg
|
|
172
|
+
* underscored and reach for `eb('col', op, value)` directly.
|
|
173
|
+
*/
|
|
174
|
+
type TableRefs<DB, Table extends keyof DB & string> = DB[Table];
|
|
175
|
+
/**
|
|
176
|
+
* Options bag for `findMany` / `findFirst` / `findUnique`.
|
|
177
|
+
*
|
|
178
|
+
* `with` keys are constrained to the relations declared for `Table`;
|
|
179
|
+
* nested `with` recursively constrains in the same way. Boolean
|
|
180
|
+
* shorthand (`with: { posts: true }`) eager-loads with no
|
|
181
|
+
* per-relation filtering; the object form takes a nested
|
|
182
|
+
* `FindManyOptions` for the related table.
|
|
183
|
+
*/
|
|
184
|
+
interface FindManyOptions<DB = RegisteredDB, Table extends keyof DB & string = keyof DB & string> {
|
|
185
|
+
where?: (table: TableRefs<DB, Table>, ops: QueryOps<DB, Table>) => Expression<unknown>;
|
|
186
|
+
orderBy?: (table: TableRefs<DB, Table>, ops: QueryOps<DB, Table>) => Expression<unknown> | Array<Expression<unknown>>;
|
|
187
|
+
limit?: number;
|
|
188
|
+
offset?: number;
|
|
189
|
+
/** Override the spec's default depth guard (5). Throws `RelationalQueryDepthError` on excess. */
|
|
190
|
+
maxDepth?: number;
|
|
191
|
+
/** Skip per-row `customType.fromDriver` walk on JSON-aggregated rows (spec §7 R-1). */
|
|
192
|
+
raw?: boolean;
|
|
193
|
+
with?: WithClause<DB, TableRelations<Table>>;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Per-relation shape inside `with`. `true` for boolean shorthand;
|
|
197
|
+
* a nested `FindManyOptions` for filtered eager loads. Only relations
|
|
198
|
+
* whose `target` is also a key of the local `DB` are accepted —
|
|
199
|
+
* cross-DB relations are unrepresentable at the call site.
|
|
200
|
+
*/
|
|
201
|
+
type WithClause<DB, Rels extends Record<string, RelationMapEntry>> = { [K in keyof Rels]?: Rels[K]['target'] extends keyof DB & string ? true | FindManyOptions<DB, Rels[K]['target']> : never };
|
|
202
|
+
/**
|
|
203
|
+
* Resolved row shape returned by `findMany`. Base table columns
|
|
204
|
+
* intersected with the per-relation slot map produced by `with`.
|
|
205
|
+
*/
|
|
206
|
+
type FindManyRow<DB, Table extends keyof DB & string, Opts extends FindManyOptions<DB, Table>> = DB[Table] & WithSlots<DB, Table, Opts['with']>;
|
|
207
|
+
/**
|
|
208
|
+
* Map each present `with` key to its resolved relation slot. Absent
|
|
209
|
+
* keys do not appear in the result shape — adopters who omit `with`
|
|
210
|
+
* get the bare row type back.
|
|
211
|
+
*/
|
|
212
|
+
type WithSlots<DB, Table extends keyof DB & string, W> = W extends Record<string, unknown> ? { [K in keyof W & keyof TableRelations<Table>]: ResolveRelationSlot<DB, TableRelations<Table>[K], W[K]> } : {};
|
|
213
|
+
/**
|
|
214
|
+
* Resolve one slot. `one` returns `Related | null`; `many` returns
|
|
215
|
+
* `Related[]`. Nested options recurse through `FindManyRow`.
|
|
216
|
+
*/
|
|
217
|
+
type ResolveRelationSlot<DB, R extends RelationMapEntry, V> = R['target'] extends keyof DB & string ? V extends true ? R['kind'] extends 'one' ? DB[R['target']] | null : DB[R['target']][] : V extends FindManyOptions<DB, R['target']> ? R['kind'] extends 'one' ? FindManyRow<DB, R['target'], V> | null : FindManyRow<DB, R['target'], V>[] : never : never;
|
|
218
|
+
/**
|
|
219
|
+
* Per-table query namespace exposed as `db.query.X`. v1 ships read
|
|
220
|
+
* methods only — writes route through layers 1 + 2 (`selectFrom`,
|
|
221
|
+
* `insertInto`, etc.).
|
|
222
|
+
*/
|
|
223
|
+
interface TableQueryNamespace<DB, Table extends keyof DB & string> {
|
|
224
|
+
findMany<O extends FindManyOptions<DB, Table>>(options?: O): Promise<Array<FindManyRow<DB, Table, O>>>;
|
|
225
|
+
findFirst<O extends FindManyOptions<DB, Table>>(options?: O): Promise<FindManyRow<DB, Table, O> | null>;
|
|
226
|
+
findUnique<O extends FindManyOptions<DB, Table>>(options: O): Promise<FindManyRow<DB, Table, O> | null>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Top-level `db.query` namespace. One slot per table in `DB`. Defaults
|
|
230
|
+
* to `RegisteredDB` so adopters using the bare `KickDbClient`
|
|
231
|
+
* (relying on the `KickDbRegister` augmentation) get the right shape
|
|
232
|
+
* without an explicit generic.
|
|
233
|
+
*/
|
|
234
|
+
type QueryNamespace<DB = RegisteredDB> = { [Table in keyof DB & string]: TableQueryNamespace<DB, Table> };
|
|
235
|
+
//#endregion
|
|
106
236
|
//#region src/client/types.d.ts
|
|
107
237
|
interface QueryEvent {
|
|
108
238
|
sql: string;
|
|
@@ -171,6 +301,19 @@ interface KickDbClient<DB = RegisteredDB> {
|
|
|
171
301
|
insertInto: Kysely<DB>['insertInto'];
|
|
172
302
|
updateTable: Kysely<DB>['updateTable'];
|
|
173
303
|
deleteFrom: Kysely<DB>['deleteFrom'];
|
|
304
|
+
/**
|
|
305
|
+
* Relational query namespace — `db.query.users.findMany({ with: {
|
|
306
|
+
* posts: true } })`. PG-only in v1; SQLite + MySQL adopters get a
|
|
307
|
+
* `RelationalQueryNotSupportedError` on first call. The shape is
|
|
308
|
+
* inferred from the local `DB` generic (which itself defaults to
|
|
309
|
+
* `RegisteredDB` so adopters using the bare `KickDbClient` still
|
|
310
|
+
* see the right table set).
|
|
311
|
+
*
|
|
312
|
+
* Available `with` keys come from the `KickDbRelationsRegister`
|
|
313
|
+
* augmentation emitted by the kick/db typegen plugin alongside
|
|
314
|
+
* the column-shape augmentation.
|
|
315
|
+
*/
|
|
316
|
+
readonly query: QueryNamespace<DB>;
|
|
174
317
|
on<E extends keyof KickDbClientEvents>(event: E, listener: (e: KickDbClientEvents[E]) => void | Promise<void>): this;
|
|
175
318
|
off<E extends keyof KickDbClientEvents>(event: E, listener: (e: KickDbClientEvents[E]) => void | Promise<void>): this;
|
|
176
319
|
transaction<T>(fn: (tx: KickDbClient<DB>) => Promise<T>): Promise<T>;
|
|
@@ -251,5 +394,5 @@ interface CreateDbClientOptions<TSchema, _DB = unknown> {
|
|
|
251
394
|
bus?: _$_forinda_kickjs_devtools_kit_bus0.KickEventBus;
|
|
252
395
|
}
|
|
253
396
|
//#endregion
|
|
254
|
-
export { QueryErrorEvent as a, TransactionEvent as c,
|
|
255
|
-
//# sourceMappingURL=types-
|
|
397
|
+
export { ModelExtensions as C, ExtensionDefinition as S, TableRelations as _, QueryErrorEvent as a, RegisteredDB as b, TransactionEvent as c, FindManyRow as d, KickDbRelationsRegister as f, TableQueryNamespace as g, RelationMapEntry as h, KickDbClientEvents as i, TransactionRollbackEvent as l, RegisteredRelations as m, CreateDbClientOptions as n, QueryEvent as o, QueryNamespace as p, KickDbClient as r, SlowQueryEvent as s, BeforeQueryEvent as t, FindManyOptions as u, WithClause as v, ExtendedClient as x, KickDbRegister as y };
|
|
398
|
+
//# sourceMappingURL=types-BBdfnVt3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BBdfnVt3.d.mts","names":[],"sources":["../src/extend/types.ts","../src/client/register.ts","../src/query/types.ts","../src/client/types.ts"],"mappings":";;;;;;;;;;AA2CA;;;KAAY,eAAA,yBACM,EAAA,aAAe,MAAA,aAAmB,IAAA;;;;;;AASpD;UAAiB,eAAA;EAAe;EAE9B,KAAA,EAAO,OAAA,CAAQ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AA,WAAmE,mBAAA,CAAF,EAAA,GAC/D,GAAA,EAAK,CAAA,GAC0C,cAAA,CAAL,EAAA,EAAI,CAAA;EAEhD,OAAA,IAAW,OAAA;AAAA;AAAA,UAGI,qBAAA;EH/Cc;EGiD7B,MAAA,EAAQ,OAAA;EH/CD;EGiDP,OAAA,EAAS,OAAA;EHjDe;;;;;;EGwDxB,MAAA;EHxDmF;AAUrF;;;;;EGqDE,oBAAA;EHpDqC;;;;;;;;;;;;;;;;;;;;;;;;;;;EGgFrC,GAAA,GA1CsB,mCAAA,CA0C2B,YAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-db v5.
|
|
2
|
+
* @forinda/kickjs-db v5.3.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
const KICK_GENERATED=Symbol.for(`@forinda/kickjs-db/Generated`),KICK_NOT_NULL=Symbol.for(`@forinda/kickjs-db/NotNull`);var ColumnBuilder=class{state;constructor(type,defaults={}){this.state={type,nullable:defaults.nullable??!0,default:defaults.default??null,primaryKey:defaults.primaryKey??!1,unique:defaults.unique??!1,references:defaults.references??null}}notNull(){return this.state.nullable=!1,this}primaryKey(){return this.state.primaryKey=!0,this.state.nullable=!1,this}unique(){return this.state.unique=!0,this}array(){return this.state.type=`${this.state.type}[]`,this}references(target,opts={}){return this.state.references={thunk:target,onDelete:opts.onDelete??`no_action`,onUpdate:opts.onUpdate??`no_action`},this}default(value){return this.state.default=value,this}toJSON(name){return{name,type:this.state.type,nullable:this.state.nullable,default:this.state.default,primaryKey:this.state.primaryKey}}__state(){return this.state}};export{KICK_GENERATED as n,KICK_NOT_NULL as r,ColumnBuilder as t};
|
|
12
|
-
//# sourceMappingURL=types-
|
|
12
|
+
//# sourceMappingURL=types-CnjiG9ij.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-CnjiG9ij.mjs","names":[],"sources":["../src/dsl/columns/types.ts"],"sourcesContent":["import type { ColumnSnapshot, FkAction } from '../../snapshot/types'\n\n/**\n * Runtime + type representation of a column reference (e.g. `users.id`).\n * Carries the parent table name, the column's own name, plus runtime\n * accessors used by FK thunks and constraint builders.\n *\n * Exported so adopters can annotate self-referencing thunks without\n * spelling the shape inline:\n *\n * parentId: uuid().references((): ColumnRef => categories.id)\n *\n * Without the annotation the initializer of a self-referencing const\n * trips TS7022 — TS needs to infer the const while the initializer\n * already references it.\n */\nexport interface ColumnRef {\n __tableName: string\n __name: string\n __builder: ColumnBuilder\n __state: () => ReturnType<ColumnBuilder['__state']>\n}\n\n/**\n * Resolved FK spec — `table` / `column` are pulled by invoking `thunk()`\n * lazily. The thunk pattern lets self-referencing tables work:\n *\n * const categories = table('categories', {\n * id: uuid().primaryKey().defaultRandom(),\n * parentId: uuid().references((): ColumnRef => categories.id),\n * })\n *\n * If we resolved at `.references()` call time, `categories` would TDZ-fail\n * inside its own initializer. Storing the thunk and resolving on read\n * (extract / render / emit) defers until after the const binding lands.\n */\nexport interface FkSpec {\n thunk: () => ColumnRef\n onDelete: FkAction\n onUpdate: FkAction\n}\n\nexport interface ColumnState {\n type: string\n nullable: boolean\n default: string | null\n primaryKey: boolean\n unique: boolean\n references: FkSpec | null\n}\n\n/**\n * Type-only brand attached to a column when it's auto-assigned by the\n * database (serial / bigserial / smallserial), has a runtime default\n * (`.default(...)`), or carries an expression default\n * (`uuid().defaultRandom()`, `timestamp().defaultNow()`). `SchemaToTypes<S>`\n * reads this marker and wraps the column type in Kysely's `Generated<T>` so\n * adopters can omit the column on insert.\n *\n * Runtime is a no-op — the symbol never reaches a value.\n */\nexport const KICK_GENERATED = Symbol.for('@forinda/kickjs-db/Generated')\nexport type GeneratedBrand = { readonly [KICK_GENERATED]?: true }\n\n/**\n * Type-only brand attached to a column when `.notNull()` or `.primaryKey()`\n * is called. `SchemaToTypes<S>` reads this brand to decide whether the\n * column type is `T` (NOT NULL) or `T | null` (default nullable).\n *\n * Why a brand instead of a class generic: chained methods (notNull,\n * primaryKey) can return `this & NotNullBrand` to narrow nullability while\n * preserving the subclass identity — so `uuid().primaryKey().defaultRandom()`\n * still resolves `defaultRandom()` on `UuidBuilder`. A class generic\n * `<TNullable>` would collapse the subclass back to the parent.\n */\nexport const KICK_NOT_NULL = Symbol.for('@forinda/kickjs-db/NotNull')\nexport type NotNullBrand = { readonly [KICK_NOT_NULL]?: true }\n\n/**\n * Phantom-typed column builder. The `T` generic carries the column's TS\n * value type (number / string / Date / etc.); nullability is tracked via\n * the `NotNullBrand` intersection rather than a class generic so chain\n * methods preserve subclass identity.\n *\n * Both `T` and the brand are erased at runtime; they exist purely so\n * `SchemaToTypes<S>` can pull them out per column.\n */\nexport class ColumnBuilder<T = unknown> {\n // Phantom param shows up in the public surface so the type system sees\n // it. Reading it at runtime is intentionally not supported.\n declare readonly __t?: T\n\n protected state: ColumnState\n\n constructor(type: string, defaults: Partial<ColumnState> = {}) {\n this.state = {\n type,\n nullable: defaults.nullable ?? true,\n default: defaults.default ?? null,\n primaryKey: defaults.primaryKey ?? false,\n unique: defaults.unique ?? false,\n references: defaults.references ?? null,\n }\n }\n\n notNull(): this & NotNullBrand {\n this.state.nullable = false\n return this as this & NotNullBrand\n }\n\n primaryKey(): this & NotNullBrand {\n this.state.primaryKey = true\n this.state.nullable = false\n return this as this & NotNullBrand\n }\n\n unique(): this {\n this.state.unique = true\n return this\n }\n\n array(): ColumnBuilder<T[]> {\n this.state.type = `${this.state.type}[]`\n return this as unknown as ColumnBuilder<T[]>\n }\n\n references(\n target: () => ColumnRef,\n opts: { onDelete?: FkAction; onUpdate?: FkAction } = {},\n ): this {\n // Store the thunk — do NOT invoke it here. Self-referencing tables\n // pass `() => self.id` whose binding does not exist yet.\n this.state.references = {\n thunk: target,\n onDelete: opts.onDelete ?? 'no_action',\n onUpdate: opts.onUpdate ?? 'no_action',\n }\n return this\n }\n\n /**\n * Mark the column as having a runtime / DB-assigned default. The\n * `GeneratedBrand` flows into `SchemaToTypes<S>` so the column wraps\n * in `Generated<T>` — adopters can `INSERT` without specifying it.\n */\n default(value: string): this & GeneratedBrand {\n this.state.default = value\n return this as this & GeneratedBrand\n }\n\n toJSON(name: string): ColumnSnapshot {\n return {\n name,\n type: this.state.type,\n nullable: this.state.nullable,\n default: this.state.default,\n primaryKey: this.state.primaryKey,\n }\n }\n\n // Internal accessor for table()/diff to read full state including unique/references.\n __state(): Readonly<ColumnState> {\n return this.state\n }\n}\n"],"mappings":";;;;;;;;;;AA6DA,MAAa,eAAiB,OAAO,IAAI,+BAA+B,CAc3D,cAAgB,OAAO,IAAI,6BAA6B,CAYrE,IAAa,cAAb,KAAwC,CAKtC,MAEA,YAAY,KAAc,SAAiC,EAAE,CAAE,CAC7D,KAAK,MAAQ,CACX,KACA,SAAU,SAAS,UAAY,GAC/B,QAAS,SAAS,SAAW,KAC7B,WAAY,SAAS,YAAc,GACnC,OAAQ,SAAS,QAAU,GAC3B,WAAY,SAAS,YAAc,KACpC,CAGH,SAA+B,CAE7B,MADA,MAAK,MAAM,SAAW,GACf,KAGT,YAAkC,CAGhC,MAFA,MAAK,MAAM,WAAa,GACxB,KAAK,MAAM,SAAW,GACf,KAGT,QAAe,CAEb,MADA,MAAK,MAAM,OAAS,GACb,KAGT,OAA4B,CAE1B,MADA,MAAK,MAAM,KAAO,GAAG,KAAK,MAAM,KAAK,IAC9B,KAGT,WACE,OACA,KAAqD,EAAE,CACjD,CAQN,MALA,MAAK,MAAM,WAAa,CACtB,MAAO,OACP,SAAU,KAAK,UAAY,YAC3B,SAAU,KAAK,UAAY,YAC5B,CACM,KAQT,QAAQ,MAAsC,CAE5C,MADA,MAAK,MAAM,QAAU,MACd,KAGT,OAAO,KAA8B,CACnC,MAAO,CACL,KACA,KAAM,KAAK,MAAM,KACjB,SAAU,KAAK,MAAM,SACrB,QAAS,KAAK,MAAM,QACpB,WAAY,KAAK,MAAM,WACxB,CAIH,SAAiC,CAC/B,OAAO,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forinda/kickjs-db",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "KickJS-native ORM — code-first schema, reversible migrations, multi-dialect SQL builder",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kickjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@types/pg": "^8.11.10",
|
|
67
67
|
"kysely": "^0.28.16",
|
|
68
68
|
"pg": "^8.13.1",
|
|
69
|
-
"typescript": "^
|
|
69
|
+
"typescript": "^6.0.3",
|
|
70
70
|
"@forinda/kickjs": "5.4.0",
|
|
71
71
|
"@forinda/kickjs-devtools-kit": "5.3.1"
|
|
72
72
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-Dc9RQGSf.d.mts","names":[],"sources":["../src/snapshot/types.ts","../src/dsl/columns/types.ts"],"mappings":";;KAAY,OAAA;AAAA,KAEA,QAAA;AAAA,UAEK,cAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,OAAA;EACA,UAAA;AAAA;AAAA,UAGe,aAAA;EACf,IAAA;EACA,OAAA;EACA,MAAA;AAAA;AAAA,UAGe,kBAAA;EACf,IAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,QAAA,EAAU,QAAA;EACV,QAAA,EAAU,QAAA;AAAA;AAAA,UAGK,aAAA;EACf,IAAA;EACA,UAAA;AAAA;AAAA,UAGe,aAAA;EACf,IAAA;EACA,OAAA,EAAS,MAAA,SAAe,cAAA;EACxB,OAAA,EAAS,aAAA;EACT,WAAA,EAAa,kBAAA;EACb,MAAA,EAAQ,aAAA;AAAA;;;;;;UAQO,YAAA;EACf,IAAA;EAvBU;EAyBV,MAAA;AAA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