@forinda/kickjs-db 8.7.1 → 8.9.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.
Files changed (51) hide show
  1. package/dist/cli.d.mts +2 -2
  2. package/dist/cli.d.mts.map +1 -1
  3. package/dist/cli.mjs +3 -3
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/create-vlNsemtQ.mjs +31 -0
  6. package/dist/create-vlNsemtQ.mjs.map +1 -0
  7. package/dist/custom-type-BSqxHyIa.mjs +12 -0
  8. package/dist/custom-type-BSqxHyIa.mjs.map +1 -0
  9. package/dist/devtools-events.d.mts +1 -1
  10. package/dist/devtools-events.mjs +1 -1
  11. package/dist/{index-DH4qiCqU.d.mts → index-CV7dszi7.d.mts} +76 -13
  12. package/dist/index-CV7dszi7.d.mts.map +1 -0
  13. package/dist/index.d.mts +6 -6
  14. package/dist/index.mjs +2 -2
  15. package/dist/mysql.d.mts +2 -2
  16. package/dist/mysql.mjs +2 -2
  17. package/dist/{pg-BjNaBIHW.mjs → pg-DqVxnk3O.mjs} +3 -3
  18. package/dist/{pg-BjNaBIHW.mjs.map → pg-DqVxnk3O.mjs.map} +1 -1
  19. package/dist/pg.d.mts +3 -3
  20. package/dist/pg.mjs +2 -2
  21. package/dist/{schema-BIPOM1xj.d.mts → schema-Cl1eDPkD.d.mts} +3 -3
  22. package/dist/{schema-BIPOM1xj.d.mts.map → schema-Cl1eDPkD.d.mts.map} +1 -1
  23. package/dist/{schema-types-DIccweFR.d.mts → schema-types-BMUMDpUC.d.mts} +3 -3
  24. package/dist/{schema-types-DIccweFR.d.mts.map → schema-types-BMUMDpUC.d.mts.map} +1 -1
  25. package/dist/schema.d.mts +1 -1
  26. package/dist/schema.mjs +2 -2
  27. package/dist/{split-statements-DbK3GeXD.mjs → split-statements-CJIglzao.mjs} +2 -2
  28. package/dist/{split-statements-DbK3GeXD.mjs.map → split-statements-CJIglzao.mjs.map} +1 -1
  29. package/dist/sqlite.d.mts +1 -1
  30. package/dist/sqlite.d.mts.map +1 -1
  31. package/dist/sqlite.mjs +6 -5
  32. package/dist/sqlite.mjs.map +1 -1
  33. package/dist/{src-9T0BuJCO.mjs → src-CvN0zCJi.mjs} +11 -8
  34. package/dist/src-CvN0zCJi.mjs.map +1 -0
  35. package/dist/{table-B_TVt7EC.d.mts → table-xb127l8S.d.mts} +2 -2
  36. package/dist/{table-B_TVt7EC.d.mts.map → table-xb127l8S.d.mts.map} +1 -1
  37. package/dist/testing.d.mts +2 -2
  38. package/dist/testing.mjs +2 -2
  39. package/dist/{types-p2E6CrKO.d.mts → types-BosmVkt_.d.mts} +117 -9
  40. package/dist/types-BosmVkt_.d.mts.map +1 -0
  41. package/dist/{types-DtX5fIbn.d.mts → types-CBoxFMRg.d.mts} +34 -1
  42. package/dist/types-CBoxFMRg.d.mts.map +1 -0
  43. package/package.json +2 -2
  44. package/dist/create-C_rIYE5P.mjs +0 -29
  45. package/dist/create-C_rIYE5P.mjs.map +0 -1
  46. package/dist/custom-type-C0Am_FkE.mjs +0 -12
  47. package/dist/custom-type-C0Am_FkE.mjs.map +0 -1
  48. package/dist/index-DH4qiCqU.d.mts.map +0 -1
  49. package/dist/src-9T0BuJCO.mjs.map +0 -1
  50. package/dist/types-DtX5fIbn.d.mts.map +0 -1
  51. package/dist/types-p2E6CrKO.d.mts.map +0 -1
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @forinda/kickjs-db v8.9.0
3
+ *
4
+ * Copyright (c) Felix Orinda
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
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,...defaults.mode?{mode:defaults.mode}:{}}}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`,...opts.name===void 0?{}:{name:opts.name}},this}default(value){return this.state.default=typeof value==`string`?value:String(value),this.state.defaultSql=!1,this}defaultSql(expression){return this.state.default=expression,this.state.defaultSql=!0,this}$defaultFn(fn){return this.state.defaultFn=fn,this}$onUpdate(fn){return this.state.onUpdateFn=fn,this}onUpdateNow(){return this.state.managed=`updatedAt`,this}softDelete(){return this.state.managed=`softDelete`,this}generatedAlwaysAs(expression,options={}){return this.state.generated={expression,stored:options.stored??!0},this}generatedAlwaysAsIdentity(){return this.state.identity=`always`,this.state.nullable=!1,this}generatedByDefaultAsIdentity(){return this.state.identity=`byDefault`,this.state.nullable=!1,this}comment(text){return this.state.comment=text,this}colName(name){return this.state.colName=name,this}managedAs(){return this.state.managed}toJSON(name){return{name,type:this.state.type,nullable:this.state.nullable,default:this.state.default,...this.state.defaultSql?{defaultSql:!0}:{},primaryKey:this.state.primaryKey,...this.state.generated?{generated:{...this.state.generated}}:{},...this.state.identity?{identity:this.state.identity}:{},...this.state.comment===void 0?{}:{comment:this.state.comment}}}__state(){return this.state}},CustomColumnBuilder=class extends ColumnBuilder{toDriver;fromDriver;constructor(opts){super(opts.dataType()),this.toDriver=opts.toDriver,this.fromDriver=opts.fromDriver}};function customType(opts){return()=>new CustomColumnBuilder(opts)}export{KICK_NOT_NULL as a,KICK_GENERATED as i,customType as n,ColumnBuilder as r,CustomColumnBuilder as t};
12
+ //# sourceMappingURL=custom-type-BSqxHyIa.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-type-BSqxHyIa.mjs","names":[],"sources":["../src/dsl/columns/types.ts","../src/custom-type.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 */\n/**\n * A column ref that knows its column's value type — what lets a foreign key\n * be checked against the column it points at (`fk()`). Assignable to\n * `ColumnRef`, so every existing ref-taking API keeps working.\n */\nexport type TypedColumnRef<T> = ColumnRef & { readonly __valueType?: T }\n\n/** Typed refs for a column record — one per column. */\nexport type TypedColumnRefs<C> = {\n [K in keyof C]: TypedColumnRef<C[K] extends ColumnBuilder<infer T> ? T : never>\n}\n\nexport interface FkSpec {\n thunk: () => ColumnRef\n onDelete: FkAction\n onUpdate: FkAction\n /**\n * The constraint's name in the database.\n *\n * Omitted for schemas written by hand — the name is then derived as\n * `<table>_<column>_fk`. It is set when the schema was generated by\n * `kick db introspect`, because a database names its constraints itself:\n * Postgres' own default is `<table>_<column>_fkey`, and a DBA may have\n * chosen anything. Dropping the real name would make the next diff want to\n * rename every foreign key in the schema.\n */\n name?: string\n}\n\nexport interface ColumnState {\n type: string\n nullable: boolean\n default: string | null\n /** `default` is SQL to evaluate (`.defaultSql()`), not a value. */\n defaultSql?: boolean\n primaryKey: boolean\n unique: boolean\n references: FkSpec | null\n /**\n * A column kick/db maintains itself: `'updatedAt'` (set on every update),\n * `'version'` (incremented on every update), `'softDelete'` (rows with it\n * set are skipped by relational reads). Never part of the snapshot — it\n * changes queries, not the schema.\n */\n managed?: 'updatedAt' | 'version' | 'softDelete'\n generated?: { expression: string; stored: boolean }\n identity?: 'always' | 'byDefault'\n /**\n * How a bigint / numeric value is read back (`bigint({ mode })`,\n * `numeric(p, s, { mode })`). Unset, the driver's own value is returned.\n */\n mode?: 'bigint' | 'number' | 'string'\n /** `.comment()`: stored in the database on Postgres and MySQL. */\n comment?: string\n /** `.colName()`: the column's name in the database, when it isn't the key (or its `casing`). */\n colName?: string\n /** `tenantKey(tenancy)`: this is the table's tenant column. */\n tenancy?: { strategy: string; setting: string }\n /** `$defaultFn`: computed in JS for each inserted row that doesn't set it. */\n defaultFn?: () => unknown\n /** `$onUpdate`: computed in JS for each update that doesn't set it. */\n onUpdateFn?: () => unknown\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 for a column the database always computes — a generated\n * column, or an identity `GENERATED ALWAYS`. `SchemaToTypes<S>` wraps it in\n * Kysely's `GeneratedAlways<T>`, so it can't be inserted or updated.\n */\nexport const KICK_GENERATED_ALWAYS = Symbol.for('@forinda/kickjs-db/GeneratedAlways')\nexport type GeneratedAlwaysBrand = { readonly [KICK_GENERATED_ALWAYS]?: 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 * Re-attach the nullability / generated brands after a transform that\n * must return a *new* builder type (e.g. `.array()` widening `T` to\n * `T[]`). Without this, `integer().notNull().array()` silently dropped\n * `NotNullBrand` and the row type regressed to `number[] | null`.\n *\n * Uses the same `extends` checks as `SchemaToTypes` (client/schema-types.ts)\n * so detection stays consistent in both directions.\n */\nexport type PreserveBrands<Self, Out> = Out &\n (Self extends NotNullBrand ? NotNullBrand : unknown) &\n (Self extends GeneratedBrand ? GeneratedBrand : unknown) &\n (Self extends GeneratedAlwaysBrand ? GeneratedAlwaysBrand : unknown)\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 ...(defaults.mode ? { mode: defaults.mode } : {}),\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(): PreserveBrands<this, ColumnBuilder<T[]>> {\n this.state.type = `${this.state.type}[]`\n return this as unknown as PreserveBrands<this, ColumnBuilder<T[]>>\n }\n\n references(\n target: () => ColumnRef,\n opts: { onDelete?: FkAction; onUpdate?: FkAction; name?: string } = {},\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 // Only carried when given: an absent name means \"derive it\", and\n // storing the derived value here would make it indistinguishable from\n // an explicit one that happens to match.\n ...(opts.name === undefined ? {} : { name: opts.name }),\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 * Accepts the natural literal for the column type — `boolean().default(false)`,\n * `integer().default(0)`, `varchar().default('active')`. Non-string\n * literals are normalised to their SQL-literal text so the snapshot\n * (`ColumnSnapshot.default: string | null`) and migration emitter stay\n * string-only. For a quoted string default the text is the value\n * itself (`'active'`); booleans/numbers emit bare (`false`, `0`).\n */\n default(value: string | number | boolean): this & GeneratedBrand {\n this.state.default = typeof value === 'string' ? value : String(value)\n this.state.defaultSql = false\n return this as this & GeneratedBrand\n }\n\n /**\n * A default that is SQL, evaluated by the database for each new row —\n * `id: text().primaryKey().defaultSql('gen_random_uuid()::text')`,\n * `slug: text().defaultSql(\"lower(hex(randomblob(8)))\")`. `.default()` is a\n * value: on a text column `.default('now()')` stores the string `now()`.\n * Written as given, so it's your dialect's SQL.\n */\n defaultSql(expression: string): this & GeneratedBrand {\n this.state.default = expression\n this.state.defaultSql = true\n return this as this & GeneratedBrand\n }\n\n /**\n * A default computed in JS for each inserted row that doesn't set this\n * column — an id generator, a slug, a value from config:\n * `id: text().primaryKey().$defaultFn(() => ulid())`. Not part of the\n * schema: the database has no default, so raw SQL inserts must set it.\n */\n $defaultFn(fn: () => T): this & GeneratedBrand {\n this.state.defaultFn = fn\n return this as this & GeneratedBrand\n }\n\n /**\n * A value computed in JS for each update (and an upsert's update branch)\n * that doesn't set this column: `revisedBy: text().$onUpdate(() => currentUser())`.\n * Like `onUpdateNow()`, with your own value. Inserts don't call it.\n */\n $onUpdate(fn: () => T): this {\n this.state.onUpdateFn = fn\n return this\n }\n\n /**\n * Set this column to the current time on every update that doesn't set it\n * itself — `updatedAt: timestamp().notNull().defaultNow().onUpdateNow()`.\n */\n onUpdateNow(): this {\n this.state.managed = 'updatedAt'\n return this\n }\n\n /**\n * Mark this column — a nullable timestamp — as the soft-delete marker:\n * relational reads (`db.query`) skip rows where it's set, at every level,\n * unless asked `withDeleted: true`. Soft-delete by setting it.\n */\n softDelete(): this {\n this.state.managed = 'softDelete'\n return this\n }\n\n /**\n * Computed by the database from other columns, on every write:\n * `total: numeric(12, 2).generatedAlwaysAs('price * quantity')`. The SQL is\n * passed through as written. Stored by default; `{ stored: false }` makes\n * it virtual, computed on read (MySQL, SQLite, Postgres 18+). It can't be\n * inserted or updated.\n */\n generatedAlwaysAs(\n expression: string,\n options: { stored?: boolean } = {},\n ): this & GeneratedAlwaysBrand {\n this.state.generated = { expression, stored: options.stored ?? true }\n return this as this & GeneratedAlwaysBrand\n }\n\n /**\n * An identity column the database numbers and won't let you set (Postgres)\n * — the SQL-standard successor to `serial`.\n */\n generatedAlwaysAsIdentity(): this & NotNullBrand & GeneratedAlwaysBrand {\n this.state.identity = 'always'\n this.state.nullable = false\n return this as this & NotNullBrand & GeneratedAlwaysBrand\n }\n\n /** An identity column the database numbers unless a value is given (Postgres). */\n generatedByDefaultAsIdentity(): this & NotNullBrand & GeneratedBrand {\n this.state.identity = 'byDefault'\n this.state.nullable = false\n return this as this & NotNullBrand & GeneratedBrand\n }\n\n /**\n * A comment stored with the column in the database, for whoever reads the\n * schema there (Postgres, MySQL; SQLite has none). Changing it migrates.\n */\n comment(text: string): this {\n this.state.comment = text\n return this\n }\n\n /**\n * The column's name in the database, when it isn't the key — a legacy\n * `EMAIL_ADDR` behind an `email` key. Taken as written: `casing` doesn't\n * change it. Queries, `db.query` and migrations use it; your code keeps the key.\n */\n colName(name: string): this {\n this.state.colName = name\n return this\n }\n\n /** The role kick/db maintains this column in, if any. */\n managedAs(): ColumnState['managed'] {\n return this.state.managed\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 ...(this.state.defaultSql ? { defaultSql: true as const } : {}),\n primaryKey: this.state.primaryKey,\n // Only when set, so other columns serialize as they always have.\n ...(this.state.generated ? { generated: { ...this.state.generated } } : {}),\n ...(this.state.identity ? { identity: this.state.identity } : {}),\n ...(this.state.comment !== undefined ? { comment: this.state.comment } : {}),\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","// customType<T>() — adopter-defined column type with optional driver\n// codecs. Lets a project introduce a typed column that doesn't ship\n// in the built-in DSL (encrypted strings, custom JSON shapes, citext,\n// PostGIS geometry, etc.) without forking the package.\n//\n// Schema usage:\n//\n// const encrypted = customType<EncryptedString>({\n// dataType: () => 'text',\n// toDriver: (s) => encrypt(s),\n// fromDriver: (raw) => decrypt(String(raw)),\n// })\n//\n// export const secrets = table('secrets', {\n// id: serial().primaryKey(),\n// value: encrypted().notNull(),\n// })\n//\n// `SchemaToTypes<typeof schema>` reads the phantom T from the\n// CustomColumnBuilder so `db.selectFrom('secrets').select('value')`\n// types `value: EncryptedString` (not `string`). Driver codecs flow\n// through the lifecycle plugin landing in M2.F-T19; until then they\n// are stored on the builder for the runtime hookup to pick up.\n\nimport { ColumnBuilder } from './dsl/columns/types'\n\nexport interface CustomTypeOptions<TJs, TDriver = unknown> {\n /**\n * SQL data type as it would appear in `CREATE TABLE` — `'text'`,\n * `'jsonb'`, `'citext'`, `'geometry(Point, 4326)'`, etc. Returned\n * via a thunk so adopters can compute the type from runtime config\n * (e.g. dialect-specific overrides).\n */\n dataType: () => string\n /** Optional encode hook applied at insert / update time. */\n toDriver?: (value: TJs) => TDriver\n /** Optional decode hook applied to selected rows. */\n fromDriver?: (driver: TDriver) => TJs\n}\n\n/**\n * ColumnBuilder subclass produced by `customType()`. Carries the\n * driver codecs so the (future) hooks pipeline can wire them through\n * a Kysely plugin without each consumer re-declaring its mapping.\n *\n * The phantom `T` flows through `SchemaToTypes<S>` exactly like any\n * other ColumnBuilder<T>, so adopters get full row-shape inference\n * for free.\n */\nexport class CustomColumnBuilder<TJs> extends ColumnBuilder<TJs> {\n /** Encode hook — run on values heading into the database. */\n readonly toDriver?: (value: TJs) => unknown\n /** Decode hook — run on row values coming out of the database. */\n readonly fromDriver?: (driver: unknown) => TJs\n\n constructor(opts: CustomTypeOptions<TJs>) {\n super(opts.dataType())\n this.toDriver = opts.toDriver as never\n this.fromDriver = opts.fromDriver as never\n }\n}\n\n/**\n * Build a reusable column factory for a custom type. The returned\n * function is what callers use inside `table('foo', { col: factory() })`\n * — same shape as the built-in `varchar()`, `text()`, etc.\n *\n * @example\n * ```ts\n * const ulid = customType<string>({\n * dataType: () => 'char(26)',\n * toDriver: (s) => s,\n * fromDriver: (raw) => String(raw),\n * })\n *\n * const events = table('events', {\n * id: ulid().primaryKey(),\n * ts: timestamp().notNull().defaultNow(),\n * })\n * ```\n */\nexport function customType<TJs>(opts: CustomTypeOptions<TJs>): () => CustomColumnBuilder<TJs> {\n return () => new CustomColumnBuilder<TJs>(opts)\n}\n"],"mappings":";;;;;;;;;;AA8GA,MAAa,eAAiB,OAAO,IAAI,8BAA8B,EAsB1D,cAAgB,OAAO,IAAI,4BAA4B,EA0BpE,IAAa,cAAb,KAAwC,CAKtC,MAEA,YAAY,KAAc,SAAiC,CAAC,EAAG,CAC7D,KAAK,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AMA,2BAAwE,CAGtE,MAFA,MAAK,MAAM,SAAW,SACtB,KAAK,MAAM,SAAW,GACf,IACT,CAGA,8BAAqE,CAGnE,MAFA,MAAK,MAAM,SAAW,YACtB,KAAK,MAAM,SAAW,GACf,IACT,CAMA,QAAQ,KAAoB,CAE1B,MADA,MAAK,MAAM,QAAU,KACd,IACT,CAOA,QAAQ,KAAoB,CAE1B,MADA,MAAK,MAAM,QAAU,KACd,IACT,CAGA,WAAoC,CAClC,OAAO,KAAK,MAAM,OACpB,CAEA,OAAO,KAA8B,CACnC,MAAO,CACL,KACA,KAAM,KAAK,MAAM,KACjB,SAAU,KAAK,MAAM,SACrB,QAAS,KAAK,MAAM,QACpB,GAAI,KAAK,MAAM,WAAa,CAAE,WAAY,EAAc,EAAI,CAAC,EAC7D,WAAY,KAAK,MAAM,WAEvB,GAAI,KAAK,MAAM,UAAY,CAAE,UAAW,CAAE,GAAG,KAAK,MAAM,SAAU,CAAE,EAAI,CAAC,EACzE,GAAI,KAAK,MAAM,SAAW,CAAE,SAAU,KAAK,MAAM,QAAS,EAAI,CAAC,EAC/D,GAAI,KAAK,MAAM,UAAY,IAAA,GAA8C,CAAC,EAAnC,CAAE,QAAS,KAAK,MAAM,OAAQ,CACvE,CACF,CAGA,SAAiC,CAC/B,OAAO,KAAK,KACd,CACF,ECzTa,oBAAb,cAA8C,aAAmB,CAE/D,SAEA,WAEA,YAAY,KAA8B,CACxC,MAAM,KAAK,SAAS,CAAC,EACrB,KAAK,SAAW,KAAK,SACrB,KAAK,WAAa,KAAK,UACzB,CACF,EAqBA,SAAgB,WAAgB,KAA8D,CAC5F,UAAa,IAAI,oBAAyB,IAAI,CAChD"}
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as QueryErrorEvent, l as SlowQueryEvent, o as QueryEvent } from "./types-p2E6CrKO.mjs";
2
+ import { o as QueryErrorEvent, s as QueryEvent, u as SlowQueryEvent } from "./types-BosmVkt_.mjs";
3
3
  //#region src/devtools-events.d.ts
4
4
  declare module '@forinda/kickjs-devtools-kit/bus' {
5
5
  interface KickDevtoolsEventRegistry {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-db v8.7.1
2
+ * @forinda/kickjs-db v8.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -1,12 +1,12 @@
1
1
 
2
- import { C as TableSnapshot, S as SchemaSnapshot, _ as ForeignKeySnapshot, b as RelationSnapshot, d as TypedColumnRefs, f as CheckSnapshot, h as EnumSnapshot, l as NotNullBrand, m as Dialect$1, n as ColumnRef, o as GeneratedBrand, p as ColumnSnapshot, t as ColumnBuilder, u as TypedColumnRef, v as IndexSnapshot, w as ViewSnapshot, x as RoleSnapshot, y as PolicySnapshot } from "./types-DtX5fIbn.mjs";
3
- import { n as CreateDbClientOptions, r as KickDbClient, y as RelationMapEntry } from "./types-p2E6CrKO.mjs";
4
- import { f as TableConstraint, l as IndexDecl, n as TableDecl } from "./table-B_TVt7EC.mjs";
5
- import { t as SchemaToTypes } from "./schema-types-DIccweFR.mjs";
6
- import { o as SchemaLike, t as ColumnRule } from "./schema-BIPOM1xj.mjs";
2
+ import { C as TableSnapshot, S as SchemaSnapshot, _ as ForeignKeySnapshot, b as RelationSnapshot, d as TypedColumnRefs, f as CheckSnapshot, h as EnumSnapshot, l as NotNullBrand, m as Dialect$1, n as ColumnRef, o as GeneratedBrand, p as ColumnSnapshot, t as ColumnBuilder, u as TypedColumnRef, v as IndexSnapshot, w as ViewSnapshot, x as RoleSnapshot, y as PolicySnapshot } from "./types-CBoxFMRg.mjs";
3
+ import { b as RelationMapEntry, n as CreateDbClientOptions, r as KickDbClient } from "./types-BosmVkt_.mjs";
4
+ import { f as TableConstraint, l as IndexDecl, n as TableDecl } from "./table-xb127l8S.mjs";
5
+ import { t as SchemaToTypes } from "./schema-types-BMUMDpUC.mjs";
6
+ import { o as SchemaLike, t as ColumnRule } from "./schema-Cl1eDPkD.mjs";
7
7
  import { CompiledQuery, Expression, Expression as Expression$1, ExpressionBuilder, ExpressionBuilder as ExpressionBuilder$1, Kysely, Kysely as Kysely$1, KyselyPlugin, KyselyPlugin as KyselyPlugin$1, RawBuilder, RawBuilder as RawBuilder$1, SelectType, Sql, SqlBool, SqlBool as SqlBool$1, sql as sql$1 } from "kysely";
8
- import { InjectionToken } from "@forinda/kickjs";
9
8
  import { AsyncLocalStorage } from "node:async_hooks";
9
+ import { InjectionToken } from "@forinda/kickjs";
10
10
  import { ReadonlyKysely } from "kysely/readonly";
11
11
  //#region src/migrate/adapter.d.ts
12
12
  interface MigrationRow {
@@ -1249,6 +1249,16 @@ interface GenerateOptions {
1249
1249
  what: string;
1250
1250
  flag: string;
1251
1251
  }) => void;
1252
+ /**
1253
+ * Told about each text-like column whose `.default()` looks like a function
1254
+ * call (`text().default('uuid()')`). On SQLite and MySQL it used to be
1255
+ * evaluated; it's a value now, as on Postgres, and `.defaultSql()` is SQL.
1256
+ */
1257
+ onCallShapedDefault?: (column: {
1258
+ table: string;
1259
+ column: string;
1260
+ value: string;
1261
+ }) => void;
1252
1262
  }
1253
1263
  interface GenerateResult {
1254
1264
  status: 'created' | 'no-changes';
@@ -1408,10 +1418,15 @@ declare class TimestampBuilder extends ColumnBuilder<Date> {
1408
1418
  constructor(typeName?: string);
1409
1419
  defaultNow(): this & GeneratedBrand;
1410
1420
  }
1411
- declare function timestamp(): TimestampBuilder;
1412
- declare function timestamptz(): TimestampBuilder;
1421
+ /** Fractional-second digits a time type stores: 0–6. */
1422
+ interface TimeOptions {
1423
+ precision?: number;
1424
+ }
1425
+ /** `timestamp({ precision: 3 })` keeps milliseconds; without one, the database's default. */
1426
+ declare function timestamp(opts?: TimeOptions): TimestampBuilder;
1427
+ declare function timestamptz(opts?: TimeOptions): TimestampBuilder;
1413
1428
  declare function date(): ColumnBuilder<Date>;
1414
- declare function time(): ColumnBuilder<string>;
1429
+ declare function time(opts?: TimeOptions): ColumnBuilder<string>;
1415
1430
  declare function interval(): ColumnBuilder<string>;
1416
1431
  /**
1417
1432
  * Subtype builder so `defaultRandom()` can mark the resulting column as
@@ -1678,6 +1693,14 @@ interface RelationOne<TTarget extends TableDecl<string, Record<string, ColumnBui
1678
1693
  * matching `relationName` on the inverse `many` side.
1679
1694
  */
1680
1695
  relationName?: string;
1696
+ morph?: never;
1697
+ morphTo?: never;
1698
+ }
1699
+ /** Set by `morphOne`: the single target row over a `(type, id)` column pair. */
1700
+ interface RelationMorphOne<TTarget extends TableDecl<string, Record<string, ColumnBuilder>> = TableDecl<string, Record<string, ColumnBuilder>>> {
1701
+ kind: 'one';
1702
+ target: TTarget;
1703
+ morph: MorphSpec;
1681
1704
  }
1682
1705
  interface RelationMany<TTarget extends TableDecl<string, Record<string, ColumnBuilder>> = TableDecl<string, Record<string, ColumnBuilder>>> {
1683
1706
  kind: 'many';
@@ -1696,13 +1719,42 @@ interface RelationMany<TTarget extends TableDecl<string, Record<string, ColumnBu
1696
1719
  * `RelationalQueryMissingInverseError` otherwise.
1697
1720
  */
1698
1721
  relationName?: string;
1722
+ /** Set by `morphMany`: a polymorphic one-to-many over a `(type, id)` column pair. */
1723
+ morph?: MorphSpec;
1724
+ }
1725
+ /**
1726
+ * `morphMany(target, { type, id, as })` / `morphOne(...)`: the target rows whose `type` column
1727
+ * holds `as` and whose `id` column holds the source's key (`references`, by
1728
+ * default the source's single-column primary key).
1729
+ */
1730
+ interface MorphSpec {
1731
+ type: ColumnRef;
1732
+ id: ColumnRef;
1733
+ as: string;
1734
+ references?: ColumnRef;
1735
+ }
1736
+ /**
1737
+ * Set by `morphTo`: the row its `(type, id)` pair points at, in whichever
1738
+ * table `targets` maps the type value to. `target` is typed as the union of
1739
+ * those tables; at runtime it holds the first.
1740
+ */
1741
+ interface RelationMorphTo<TTargets extends Record<string, TableDecl<string, Record<string, ColumnBuilder>>> = Record<string, TableDecl<string, Record<string, ColumnBuilder>>>> {
1742
+ kind: 'one';
1743
+ target: TTargets[keyof TTargets];
1744
+ morphTo: MorphToSpec<TTargets>;
1745
+ }
1746
+ /** `morphTo({ type, id, targets })`: `targets` maps each type value to its table. */
1747
+ interface MorphToSpec<TTargets extends Record<string, TableDecl<string, Record<string, ColumnBuilder>>> = Record<string, TableDecl<string, Record<string, ColumnBuilder>>>> {
1748
+ type: ColumnRef;
1749
+ id: ColumnRef;
1750
+ targets: TTargets;
1699
1751
  }
1700
1752
  type ThroughSpec = TableDecl<string, Record<string, ColumnBuilder>> | {
1701
1753
  table: TableDecl<string, Record<string, ColumnBuilder>>;
1702
1754
  from: ColumnRef[];
1703
1755
  to: ColumnRef[];
1704
1756
  };
1705
- type Relation = RelationOne | RelationMany;
1757
+ type Relation = RelationOne | RelationMorphOne | RelationMorphTo | RelationMany;
1706
1758
  /**
1707
1759
  * Generic so the typegen plugin can read the source table name and
1708
1760
  * the per-relation kind/target via `RelationsDecl['__sourceTable']`
@@ -1724,6 +1776,9 @@ interface Helpers {
1724
1776
  relationName?: string;
1725
1777
  through?: ThroughSpec;
1726
1778
  }) => RelationMany<T>;
1779
+ morphMany: <T extends TableDecl<string, Record<string, ColumnBuilder>>>(target: T, opts: MorphSpec) => RelationMany<T>;
1780
+ morphOne: <T extends TableDecl<string, Record<string, ColumnBuilder>>>(target: T, opts: MorphSpec) => RelationMorphOne<T>;
1781
+ morphTo: <T extends Record<string, TableDecl<string, Record<string, ColumnBuilder>>>>(opts: MorphToSpec<T>) => RelationMorphTo<T>;
1727
1782
  }
1728
1783
  /**
1729
1784
  * Declare a typed relation set for `source`. The return type
@@ -1808,7 +1863,15 @@ type SchemaToRelationsRegister<S> = MergeBySource<{ [K in keyof S]: S[K] extends
1808
1863
  type ResolveRelations<R extends Record<string, Relation>> = { [K in keyof R]: {
1809
1864
  kind: R[K]['kind'];
1810
1865
  target: R[K]['target'] extends TableDecl<infer N, Record<string, ColumnBuilder>> ? N extends string ? N : string : string;
1811
- }; };
1866
+ } & (R[K] extends {
1867
+ morphTo: {
1868
+ targets: infer M;
1869
+ };
1870
+ } ? {
1871
+ morphTo: MorphTargets<M>;
1872
+ } : unknown); };
1873
+ /** A morphTo's `targets`, type value → table name. */
1874
+ type MorphTargets<M> = { [V in keyof M & string]: M[V] extends TableDecl<infer N, Record<string, ColumnBuilder>> ? N extends string ? N : string : string; };
1812
1875
  /**
1813
1876
  * Fold a union of `{ source, relations }` records into a single
1814
1877
  * object keyed by `source`. TypeScript distributes the conditional
@@ -1999,5 +2062,5 @@ declare function markDialect<T extends object>(dialect: T, tag: DialectTag): T;
1999
2062
  */
2000
2063
  declare function readDialectMark(dialect: object): DialectTag | undefined;
2001
2064
  //#endregion
2002
- export { not as $, introspectSqlite as $n, RenameHints as $r, FakeOverride as $t, CustomTypeOptions as A, SetColumnComment as Ai, migrateDown as An, ConnectionError as Ar, boolean as At, between as B, MigrationAdapterFactory as Bi, KickDbAdapterConfig as Bn, TransactionFinishedError as Br, numeric as Bt, RelationalQueryDepthError as C, DropPolicy as Ci, TenantMigrationResult as Cn, MigrationError as Cr, buildView as Ct, RelationalQueryUnknownRelationError as D, RemoveEnumValue as Di, RollbackSummary as Dn, SchemaDiffSummary as Dr, UuidBuilder as Dt, RelationalQueryThroughError as E, PrimaryKeyShape as Ei, ReversedSummary as En, MigrationLockError as Er, TimestampBuilder as Et, RelationsDecl as F, extractSnapshot as Fi, safeNullComparison as Fn, ForeignKeyViolationError as Fr, doublePrecision as Ft, ilike as G, checkDrift as Gi, migrationFiles as Gn, CompositeRef as Gr, text as Gt, exists as H, resolveDbConfig as Hi, kickDbAdapter as Hn, ResolvedRelations as Hr, serial as Ht, ThroughSpec as I, Casing as Ii, createDbClient as In, NotNullViolationError as Ir, integer as It, isNull as J, MigrationRow as Ji, IntrospectMysqlOptions as Jn, RemovedValueAsDefaultError as Jr, timestamptz as Jt, inArray as K, MigrationAdapter as Ki, CodeMigration as Kn, detectCompositeReferences as Kr, time as Kt, relations as L, toDbName as Li, DB_CLIENT as Ln, SerializationFailureError as Lr, interval as Lt, Relation as M, SetTableComment as Mi, migrateRollback as Mn, DatabaseErrorInfo as Mr, char as Mt, RelationMany as N, renderSchemaSource as Ni, migrateStatus as Nn, DbDialect as Nr, date as Nt, SchemaToRelationsRegister as O, RenameColumn as Oi, RunnerOptions as On, UnreviewedMigrationError as Or, bigSerial as Ot, RelationOne as P, fitIdentifier as Pi, migrateUp as Pn, DeadlockError as Pr, decimal as Pt, ne as Q, SqliteIntrospectDb as Qn, RenameCandidates as Qr, FakeContext as Qt, Operand as R, toKeyName as Ri, DB_PRIMARY as Rn, UniqueViolationError as Rr, json as Rt, RelationalQueryCancelledError as S, DropIndex as Si, MigrateTenantsResult as Sn, MigrationEnumDropError as Sr, ViewOptions as St, RelationalQueryNotSupportedError as T, DropView as Ti, AppliedSummary as Tn, MigrationHashError as Tr, view as Tt, gt as U, DriftBehavior as Ui, MigrationFiles as Un, CompositeEnumReferenceError as Ur, smallSerial as Ut, eq as V, TenantsConfig as Vi, MigrationsOnBoot as Vn, ResolvedRelation as Vr, real as Vt, gte as W, DriftLogger as Wi, MigrationsLocation as Wn, CompositeQueryRunner as Wr, smallint as Wt, lt as X, introspectMysql as Xn, invertChanges as Xr, varchar as Xt, like as Y, MysqlIntrospectDb as Yn, hasAmbiguousReverse as Yr, uuid as Yt, lte as Z, IntrospectSqliteOptions as Zn, DiffOptions as Zr, version as Zt, LikeMatchMode as _, CreateView as _i, PushResult as _n, verifyMigrationHash as _r, tableFromClass as _t, RawBuilder$1 as a, AddForeignKey as ai, listSeeds as an, KICK_LOCK_TABLE as ar, alias as at, RelationalQueryAliasCollisionError as b, DropEnum as bi, reviewMigration as bn, parseEnumDropHeader as br, ViewDecl as bt, SqlBool$1 as c, AlterPrimaryKey as ci, checkMigrations as cn, lockTableName as cr, Rule as ct, KICK_DIALECT as d, ChangeSet as di, generate as dn, quoteTable as dr, TableBase as dt, diff as ei, FakeRowsOptions as en, introspectSqliteAsync as er, notExists as et, isDialectTag as f, CreateEnum as fi, emitMysql as fn, Journal as fr, TableClass as ft, desc as g, CreateTable as gi, PushOptions as gn, readJournal as gr, link as gt, asc as h, CreateSchema as hi, emitPg as hn, computeMigrationHash as hr, fk as ht, KyselyPlugin$1 as i, AddEnumValue as ii, SeedResult as in, MemoryMigrationAdapter as ir, AliasedTable as it, customType as j, SetRowLevelSecurity as ji, migrateLatest as jn, DatabaseError as jr, bytea as jt, CustomColumnBuilder as k, RenameTable as ki, StatusEntry as kn, CheckViolationError as kr, bigint as kt, sql$1 as l, AlterRole as li, GenerateOptions as ln, migrationsTableDdl as lr, RuleFor as lt, readDialectMark as m, CreateRole as mi, emitSqlite as mn, appendJournalEntry as mr, defineTable as mt, ExpressionBuilder$1 as n, AddCheck as ni, fakeRows as nn, IntrospectPgOptions as nr, notLike as nt, ReadonlyKysely as o, AddIndex as oi, runSeeds as on, KICK_MIGRATIONS_TABLE as or, ClassRefs as ot, markDialect as p, CreatePolicy as pi, SqliteRebuildRequiredError as pn, JournalEntry as pr, TableDefinition as pt, isNotNull as q, MigrationBookkeeping as qi, MigrationDb as qn, KickDbError as qr, timestamp as qt, Kysely$1 as r, AddColumn as ri, seedFake as rn, PgQueryRunner as rr, or as rt, Sql as s, AlterColumn as si, CheckResult as sn, lockTableDdl as sr, NumberRule as st, Expression$1 as t, findRenameCandidates as ti, SeedFakeOptions as tn, introspectPg as tr, notInArray as tt, DialectTag as u, Change as ui, GenerateResult as un, pushTableName as ur, StringRule as ut, escapeLike as v, DropCheck as vi, pushSchema as vn, EnumDropHeader as vr, selfRef as vt, RelationalQueryMissingInverseError as w, DropTable as wi, migrateTenants as wn, MigrationFailedError as wr, isView as wt, RelationalQueryAmbiguousRelationNameError as x, DropForeignKey as xi, MigrateTenantsOptions as xn, MigrationDriftError as xr, ViewMarks as xt, likePattern as y, DropColumn as yi, ReviewResult as yn, enforceEnumDropGate as yr, MaterializedViewOptions as yt, and as z, DbConfig as zi, DB_REPLICA as zn, translateDbError as zr, jsonb as zt };
2003
- //# sourceMappingURL=index-DH4qiCqU.d.mts.map
2065
+ export { like as $, MysqlIntrospectDb as $n, hasAmbiguousReverse as $r, uuid as $t, CustomTypeOptions as A, PrimaryKeyShape as Ai, ReversedSummary as An, MigrationLockError as Ar, TimestampBuilder as At, ThroughSpec as B, Casing as Bi, createDbClient as Bn, NotNullViolationError as Br, integer as Bt, RelationalQueryDepthError as C, DropColumn as Ci, ReviewResult as Cn, enforceEnumDropGate as Cr, MaterializedViewOptions as Ct, RelationalQueryUnknownRelationError as D, DropPolicy as Di, TenantMigrationResult as Dn, MigrationError as Dr, buildView as Dt, RelationalQueryThroughError as E, DropIndex as Ei, MigrateTenantsResult as En, MigrationEnumDropError as Er, ViewOptions as Et, RelationMany as F, SetRowLevelSecurity as Fi, migrateLatest as Fn, DatabaseError as Fr, bytea as Ft, eq as G, TenantsConfig as Gi, MigrationsOnBoot as Gn, ResolvedRelation as Gr, real as Gt, Operand as H, toKeyName as Hi, DB_PRIMARY as Hn, UniqueViolationError as Hr, json as Ht, RelationMorphOne as I, SetTableComment as Ii, migrateRollback as In, DatabaseErrorInfo as Ir, char as It, gte as J, DriftLogger as Ji, MigrationsLocation as Jn, CompositeQueryRunner as Jr, smallint as Jt, exists as K, resolveDbConfig as Ki, kickDbAdapter as Kn, ResolvedRelations as Kr, serial as Kt, RelationMorphTo as L, renderSchemaSource as Li, migrateStatus as Ln, DbDialect as Lr, date as Lt, MorphSpec as M, RenameColumn as Mi, RunnerOptions as Mn, UnreviewedMigrationError as Mr, bigSerial as Mt, MorphToSpec as N, RenameTable as Ni, StatusEntry as Nn, CheckViolationError as Nr, bigint as Nt, SchemaToRelationsRegister as O, DropTable as Oi, migrateTenants as On, MigrationFailedError as Or, isView as Ot, Relation as P, SetColumnComment as Pi, migrateDown as Pn, ConnectionError as Pr, boolean as Pt, isNull as Q, MigrationRow as Qi, IntrospectMysqlOptions as Qn, RemovedValueAsDefaultError as Qr, timestamptz as Qt, RelationOne as R, fitIdentifier as Ri, migrateUp as Rn, DeadlockError as Rr, decimal as Rt, RelationalQueryCancelledError as S, DropCheck as Si, pushSchema as Sn, EnumDropHeader as Sr, selfRef as St, RelationalQueryNotSupportedError as T, DropForeignKey as Ti, MigrateTenantsOptions as Tn, MigrationDriftError as Tr, ViewMarks as Tt, and as U, DbConfig as Ui, DB_REPLICA as Un, translateDbError as Ur, jsonb as Ut, relations as V, toDbName as Vi, DB_CLIENT as Vn, SerializationFailureError as Vr, interval as Vt, between as W, MigrationAdapterFactory as Wi, KickDbAdapterConfig as Wn, TransactionFinishedError as Wr, numeric as Wt, inArray as X, MigrationAdapter as Xi, CodeMigration as Xn, detectCompositeReferences as Xr, time as Xt, ilike as Y, checkDrift as Yi, migrationFiles as Yn, CompositeRef as Yr, text as Yt, isNotNull as Z, MigrationBookkeeping as Zi, MigrationDb as Zn, KickDbError as Zr, timestamp as Zt, LikeMatchMode as _, CreatePolicy as _i, SqliteRebuildRequiredError as _n, JournalEntry as _r, TableDefinition as _t, RawBuilder$1 as a, findRenameCandidates as ai, SeedFakeOptions as an, introspectPg as ar, notInArray as at, RelationalQueryAliasCollisionError as b, CreateTable as bi, PushOptions as bn, readJournal as br, link as bt, SqlBool$1 as c, AddEnumValue as ci, SeedResult as cn, MemoryMigrationAdapter as cr, AliasedTable as ct, KICK_DIALECT as d, AlterColumn as di, CheckResult as dn, lockTableDdl as dr, NumberRule as dt, invertChanges as ei, varchar as en, introspectMysql as er, lt as et, isDialectTag as f, AlterPrimaryKey as fi, checkMigrations as fn, lockTableName as fr, Rule as ft, desc as g, CreateEnum as gi, emitMysql as gn, Journal as gr, TableClass as gt, asc as h, ChangeSet as hi, generate as hn, quoteTable as hr, TableBase as ht, KyselyPlugin$1 as i, diff as ii, FakeRowsOptions as in, introspectSqliteAsync as ir, notExists as it, customType as j, RemoveEnumValue as ji, RollbackSummary as jn, SchemaDiffSummary as jr, UuidBuilder as jt, CustomColumnBuilder as k, DropView as ki, AppliedSummary as kn, MigrationHashError as kr, view as kt, sql$1 as l, AddForeignKey as li, listSeeds as ln, KICK_LOCK_TABLE as lr, alias as lt, readDialectMark as m, Change as mi, GenerateResult as mn, pushTableName as mr, StringRule as mt, ExpressionBuilder$1 as n, RenameCandidates as ni, FakeContext as nn, SqliteIntrospectDb as nr, ne as nt, ReadonlyKysely as o, AddCheck as oi, fakeRows as on, IntrospectPgOptions as or, notLike as ot, markDialect as p, AlterRole as pi, GenerateOptions as pn, migrationsTableDdl as pr, RuleFor as pt, gt as q, DriftBehavior as qi, MigrationFiles as qn, CompositeEnumReferenceError as qr, smallSerial as qt, Kysely$1 as r, RenameHints as ri, FakeOverride as rn, introspectSqlite as rr, not as rt, Sql as s, AddColumn as si, seedFake as sn, PgQueryRunner as sr, or as st, Expression$1 as t, DiffOptions as ti, version as tn, IntrospectSqliteOptions as tr, lte as tt, DialectTag as u, AddIndex as ui, runSeeds as un, KICK_MIGRATIONS_TABLE as ur, ClassRefs as ut, escapeLike as v, CreateRole as vi, emitSqlite as vn, appendJournalEntry as vr, defineTable as vt, RelationalQueryMissingInverseError as w, DropEnum as wi, reviewMigration as wn, parseEnumDropHeader as wr, ViewDecl as wt, RelationalQueryAmbiguousRelationNameError as x, CreateView as xi, PushResult as xn, verifyMigrationHash as xr, tableFromClass as xt, likePattern as y, CreateSchema as yi, emitPg as yn, computeMigrationHash as yr, fk as yt, RelationsDecl as z, extractSnapshot as zi, safeNullComparison as zn, ForeignKeyViolationError as zr, doublePrecision as zt };
2066
+ //# sourceMappingURL=index-CV7dszi7.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CV7dszi7.d.mts","names":["Dialect","Dialect","Dialect","Dialect","Dialect","Dialect"],"sources":["../src/migrate/adapter.ts","../src/migrate/drift.ts","../src/cli/config.ts","../src/snapshot/casing.ts","../src/snapshot/extract.ts","../src/snapshot/name.ts","../src/snapshot/render.ts","../src/diff/types.ts","../src/diff/engine.ts","../src/diff/invert.ts","../src/errors.ts","../src/diff/composite-detect.ts","../src/query/relations.ts","../src/client/wrap.ts","../src/db-errors.ts","../src/migrate/errors.ts","../src/migrate/enum-drop-gate.ts","../src/migrate/journal.ts","../src/migrate/schema.ts","../src/migrate/memory-adapter.ts","../src/migrate/introspect-types.ts","../src/migrate/introspect-pg.ts","../src/migrate/introspect-sqlite.ts","../src/migrate/introspect-mysql.ts","../src/migrate/code-migration.ts","../src/migrate/source.ts","../src/adapter.ts","../src/tokens.ts","../src/client/create.ts","../src/client/plugins.ts","../src/migrate/runner.ts","../src/migrate/tenants.ts","../src/migrate/review.ts","../src/migrate/push.ts","../src/emit/pg.ts","../src/emit/sqlite.ts","../src/emit/mysql.ts","../src/cli/generate.ts","../src/cli/check.ts","../src/cli/seed.ts","../src/seed/fake.ts","../src/dsl/columns/builders.ts","../src/dsl/view.ts","../src/dsl/self-ref.ts","../src/dsl/table-forms.ts","../src/dsl/alias.ts","../src/query/operators.ts","../src/dsl/relations.ts","../src/custom-type.ts","../src/query/schema-relations-types.ts","../src/query/errors.ts","../src/query/like.ts","../src/query/order.ts","../src/dialect-marker.ts"],"mappings":";;;;;;;;;;;UAGiB;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;;;;UAUe;WACN,SAASA;;EAElB,yBAAyB;;EAEzB,eAAe,QAAQ;;EAEvB,cAAc,KAAK,KAAK,6BAA6B;;EAErD,cAAc,aAAa;;EAE3B,YAAY,gBAAgB;;EAE5B,eAAe;;EAEf,aAAa,cAAc;;;;;;;;EAQ3B,oBAAoB,aAAa,aAAa,8BAA8B;;EAE5E,aAAa,cAAc;;EAE3B,cAAc,QAAQ;;;;;;EAMtB,WAAW;;WAEF;;EAET,SAAS;;;KAIC;EAAyB,QAAQ,KAAK;;EAAiC;;;;KC+FvE;UAEK;EACf,OAAO;;iBAGa,WACpB,cAAc,gBACd,kBAAkB,gBAClB,UAAU,eACV,MAAK,cACJ;;;KChKS,gCAAgC,mBAAmB,QAAQ;UAEtD;EACf;EACA;;EAEA;EACA,SAASC;;;;;;;;EAQT,aAAa;;;;;EAKb;;;;;;EAMA;;EAEA;;;;;;;EAOA;;;;;;EAMA,UAAU;;;;;E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,eAAe;QACtE,UAAU,cAAc,QAAQ;EAAK,QAAQ;;;;;;;;cCjEnC,4CAA4C;WAC9C;WACA;EACT,YAAY,qBAAqB;;;;;;;cAgBtB,kCAAkC;WACpC;WACA;EACT,YAAY,kBAAkB;;;;;;;;cAiBnB,2CAA2C;WAC7C;WACA;EACT,YAAY,qBAAqB;;;;;;;;;;;cAoBtB,sCAAsC;WACxC;EAET,YAAY;;;;;;;cA0BD,yCAAyC;WAC3C;EACT,YAAY;;;;;;;;;cAiBD,kDAAkD;WACpD;WACA;WACA;;WAEA;EACT,YACE,qBACA,qBACA,sBACA;;;;;;;;;cAwBS,2CAA2C;WAC7C;WACA;WACA;EACT,YAAY,qBAAqB,sBAAsB;;;;;;;cAsB5C,oCAAoC;WACtC;WACA;WACA;EACT,YAAY,qBAAqB,sBAAsB,kBAAkB;;;;;;;;;;;;;;;;;;;KC1K/D;;;;;;;;;;iBAWI,WAAW,eAAe;;;;;;;;;;;;iBA4B1B,YACd,eACA,OAAM,eACN;;;;;;;;;;;iBChDc,KAAK,GAAG,YAAY,WAAW,KAAK,WAAW;;iBAK/C,IAAI,GAAG,YAAY,WAAW,KAAK,WAAW;;;;;;;;;;;;;;;;;;;;cCQjD;KAED;;iBAKI,aAAa,iBAAiB,SAAS;;iBAKvC,YAAY,kBAAkB,SAAS,GAAG,KAAK,aAAa;;;;;;;iBAgB5D,gBAAgB,kBAAkB"}
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
- import { C as TableSnapshot, S as SchemaSnapshot, _ as ForeignKeySnapshot, b as RelationSnapshot, c as KICK_NOT_NULL, d as TypedColumnRefs, f as CheckSnapshot, g as FkAction, h as EnumSnapshot, i as FkSpec, l as NotNullBrand, m as Dialect, n as ColumnRef, o as GeneratedBrand, p as ColumnSnapshot, r as ColumnState, s as KICK_GENERATED, t as ColumnBuilder, u as TypedColumnRef, v as IndexSnapshot } from "./types-DtX5fIbn.mjs";
3
- import { $ as not, $n as introspectSqlite, $r as RenameHints, $t as FakeOverride, A as CustomTypeOptions, Ai as SetColumnComment, An as migrateDown, Ar as ConnectionError, At as boolean, B as between, Bn as KickDbAdapterConfig, Br as TransactionFinishedError, Bt as numeric, C as RelationalQueryDepthError, Ci as DropPolicy, Cn as TenantMigrationResult, Cr as MigrationError, Ct as buildView, D as RelationalQueryUnknownRelationError, Di as RemoveEnumValue, Dn as RollbackSummary, Dr as SchemaDiffSummary, Dt as UuidBuilder, E as RelationalQueryThroughError, Ei as PrimaryKeyShape, En as ReversedSummary, Er as MigrationLockError, Et as TimestampBuilder, F as RelationsDecl, Fi as extractSnapshot, Fn as safeNullComparison, Fr as ForeignKeyViolationError, Ft as doublePrecision, G as ilike, Gi as checkDrift, Gn as migrationFiles, Gr as CompositeRef, Gt as text, H as exists, Hi as resolveDbConfig, Hn as kickDbAdapter, Hr as ResolvedRelations, Ht as serial, I as ThroughSpec, Ii as Casing, In as createDbClient, Ir as NotNullViolationError, It as integer, J as isNull, Ji as MigrationRow, Jn as IntrospectMysqlOptions, Jr as RemovedValueAsDefaultError, Jt as timestamptz, K as inArray, Ki as MigrationAdapter, Kn as CodeMigration, Kr as detectCompositeReferences, Kt as time, L as relations, Li as toDbName, Ln as DB_CLIENT, Lr as SerializationFailureError, Lt as interval, M as Relation, Mi as SetTableComment, Mn as migrateRollback, Mr as DatabaseErrorInfo, Mt as char, N as RelationMany, Ni as renderSchemaSource, Nn as migrateStatus, Nr as DbDialect, Nt as date, O as SchemaToRelationsRegister, Oi as RenameColumn, On as RunnerOptions, Or as UnreviewedMigrationError, Ot as bigSerial, P as RelationOne, Pi as fitIdentifier, Pn as migrateUp, Pr as DeadlockError, Pt as decimal, Q as ne, Qn as SqliteIntrospectDb, Qr as RenameCandidates, Qt as FakeContext, R as Operand, Ri as toKeyName, Rn as DB_PRIMARY, Rr as UniqueViolationError, Rt as json, S as RelationalQueryCancelledError, Si as DropIndex, Sn as MigrateTenantsResult, Sr as MigrationEnumDropError, St as ViewOptions, T as RelationalQueryNotSupportedError, Ti as DropView, Tn as AppliedSummary, Tr as MigrationHashError, Tt as view, U as gt, Ui as DriftBehavior, Un as MigrationFiles, Ur as CompositeEnumReferenceError, Ut as smallSerial, V as eq, Vn as MigrationsOnBoot, Vr as ResolvedRelation, Vt as real, W as gte, Wi as DriftLogger, Wn as MigrationsLocation, Wr as CompositeQueryRunner, Wt as smallint, X as lt, Xn as introspectMysql, Xr as invertChanges, Xt as varchar, Y as like, Yn as MysqlIntrospectDb, Yr as hasAmbiguousReverse, Yt as uuid, Z as lte, Zn as IntrospectSqliteOptions, Zr as DiffOptions, Zt as version, _ as LikeMatchMode, _i as CreateView, _n as PushResult, _r as verifyMigrationHash, _t as tableFromClass, a as RawBuilder, ai as AddForeignKey, an as listSeeds, ar as KICK_LOCK_TABLE, at as alias, b as RelationalQueryAliasCollisionError, bi as DropEnum, bn as reviewMigration, br as parseEnumDropHeader, bt as ViewDecl, c as SqlBool, ci as AlterPrimaryKey, cn as checkMigrations, cr as lockTableName, ct as Rule, d as KICK_DIALECT, di as ChangeSet, dn as generate, dr as quoteTable, dt as TableBase, ei as diff, en as FakeRowsOptions, er as introspectSqliteAsync, et as notExists, f as isDialectTag, fi as CreateEnum, fn as emitMysql, fr as Journal, ft as TableClass, g as desc, gi as CreateTable, gn as PushOptions, gr as readJournal, gt as link, h as asc, hi as CreateSchema, hn as emitPg, hr as computeMigrationHash, ht as fk, i as KyselyPlugin, ii as AddEnumValue, in as SeedResult, ir as MemoryMigrationAdapter, it as AliasedTable, j as customType, ji as SetRowLevelSecurity, jn as migrateLatest, jr as DatabaseError, jt as bytea, k as CustomColumnBuilder, ki as RenameTable, kn as StatusEntry, kr as CheckViolationError, kt as bigint, l as sql, li as AlterRole, ln as GenerateOptions, lr as migrationsTableDdl, lt as RuleFor, m as readDialectMark, mi as CreateRole, mn as emitSqlite, mr as appendJournalEntry, mt as defineTable, n as ExpressionBuilder, ni as AddCheck, nn as fakeRows, nr as IntrospectPgOptions, nt as notLike, o as ReadonlyKysely, oi as AddIndex, on as runSeeds, or as KICK_MIGRATIONS_TABLE, ot as ClassRefs, p as markDialect, pi as CreatePolicy, pn as SqliteRebuildRequiredError, pr as JournalEntry, pt as TableDefinition, q as isNotNull, qi as MigrationBookkeeping, qn as MigrationDb, qr as KickDbError, qt as timestamp, r as Kysely, ri as AddColumn, rn as seedFake, rr as PgQueryRunner, rt as or, s as Sql, si as AlterColumn, sn as CheckResult, sr as lockTableDdl, st as NumberRule, t as Expression, ti as findRenameCandidates, tn as SeedFakeOptions, tr as introspectPg, tt as notInArray, u as DialectTag, ui as Change, un as GenerateResult, ur as pushTableName, ut as StringRule, v as escapeLike, vi as DropCheck, vn as pushSchema, vr as EnumDropHeader, vt as selfRef, w as RelationalQueryMissingInverseError, wi as DropTable, wn as migrateTenants, wr as MigrationFailedError, wt as isView, x as RelationalQueryAmbiguousRelationNameError, xi as DropForeignKey, xn as MigrateTenantsOptions, xr as MigrationDriftError, xt as ViewMarks, y as likePattern, yi as DropColumn, yn as ReviewResult, yr as enforceEnumDropGate, yt as MaterializedViewOptions, z as and, zi as DbConfig, zn as DB_REPLICA, zr as translateDbError, zt as jsonb } from "./index-DH4qiCqU.mjs";
4
- import { A as TenantRequiredError, C as KickDbRegister, D as Tenancy, E as BypassOptions, F as ModelExtensions, I as FindOrCreateOptions, L as UpsertOptions, M as tenantKey, N as ExtendedClient, O as TenancyOptions, P as ExtensionDefinition, R as InsertManyOptions, S as WithClause, T as BypassInfo, _ as QueryNamespace, a as QueryErrorEvent, b as TableQueryNamespace, c as ReadRouter, d as TransactionOptions, f as TransactionRetryEvent, g as KickDbRelationsRegister, h as FindManyRow, i as KickDbClientEvents, j as defineTenancy, k as TenancyStrategy, m as FindManyOptions, n as CreateDbClientOptions, o as QueryEvent, p as TransactionRollbackEvent, r as KickDbClient, s as ReadRoute, t as BeforeQueryEvent, u as TransactionEvent, v as RegisteredRelations, w as RegisteredDB, x as TableRelations, y as RelationMapEntry } from "./types-p2E6CrKO.mjs";
5
- import { a as qualifiedTableName, c as CheckDecl, d as PrimaryKeyDecl, f as TableConstraint, g as unique, h as primaryKey, i as buildTable, l as IndexDecl, m as index, n as TableDecl, o as table, p as check, r as TableOptions, s as unwrapTable, t as QualifiedName, u as IndexKey } from "./table-B_TVt7EC.mjs";
6
- import { t as SchemaToTypes } from "./schema-types-DIccweFR.mjs";
7
- export { type AddCheck, type AddColumn, type AddEnumValue, type AddForeignKey, type AddIndex, type AliasedTable, type AlterColumn, type AlterPrimaryKey, type AlterRole, type AppliedSummary, type BeforeQueryEvent, BypassInfo, BypassOptions, type Casing, type Change, type ChangeSet, CheckDecl, type CheckResult, type CheckSnapshot, CheckViolationError, type ClassRefs, type CodeMigration, ColumnBuilder, type ColumnRef, type ColumnSnapshot, type ColumnState, CompositeEnumReferenceError, type CompositeQueryRunner, type CompositeRef, ConnectionError, type CreateDbClientOptions, type CreateEnum, type CreatePolicy, type CreateRole, type CreateSchema, type CreateTable, type CreateView, CustomColumnBuilder, type CustomTypeOptions, DB_CLIENT, DB_PRIMARY, DB_REPLICA, DatabaseError, type DatabaseErrorInfo, type DbConfig, type DbDialect, DeadlockError, type Dialect, type DialectTag, type DiffOptions, type DriftBehavior, type DriftLogger, type DropCheck, type DropColumn, type DropEnum, type DropForeignKey, type DropIndex, type DropPolicy, type DropTable, type DropView, type EnumDropHeader, type EnumSnapshot, type Expression, type ExpressionBuilder, type ExtendedClient, type ExtensionDefinition, type FakeContext, type FakeOverride, type FakeRowsOptions, type FindManyOptions, type FindManyRow, type FindOrCreateOptions, type FkAction, type FkSpec, type ForeignKeySnapshot, ForeignKeyViolationError, type GenerateOptions, type GenerateResult, type GeneratedBrand, IndexDecl, IndexKey, type IndexSnapshot, type InsertManyOptions, type IntrospectMysqlOptions, type IntrospectPgOptions, type IntrospectSqliteOptions, type Journal, type JournalEntry, KICK_DIALECT, KICK_GENERATED, KICK_LOCK_TABLE, KICK_MIGRATIONS_TABLE, KICK_NOT_NULL, type KickDbAdapterConfig, type KickDbClient, type KickDbClientEvents, KickDbError, type KickDbRegister, type KickDbRelationsRegister, Kysely, type KyselyPlugin, type LikeMatchMode, MaterializedViewOptions, MemoryMigrationAdapter, type MigrateTenantsOptions, type MigrateTenantsResult, type MigrationAdapter, type MigrationBookkeeping, type MigrationDb, MigrationDriftError, MigrationEnumDropError, MigrationError, MigrationFailedError, type MigrationFiles, MigrationHashError, MigrationLockError, type MigrationRow, type MigrationsLocation, type MigrationsOnBoot, type ModelExtensions, type MysqlIntrospectDb, type NotNullBrand, NotNullViolationError, type NumberRule, Operand, type PgQueryRunner, PrimaryKeyDecl, type PrimaryKeyShape, type PushOptions, type PushResult, QualifiedName, type QueryErrorEvent, type QueryEvent, type QueryNamespace, type RawBuilder, type ReadRoute, type ReadRouter, type ReadonlyKysely, type RegisteredDB, type RegisteredRelations, Relation, RelationMany, type RelationMapEntry, RelationOne, type RelationSnapshot, RelationalQueryAliasCollisionError, RelationalQueryAmbiguousRelationNameError, RelationalQueryCancelledError, RelationalQueryDepthError, RelationalQueryMissingInverseError, RelationalQueryNotSupportedError, RelationalQueryThroughError, RelationalQueryUnknownRelationError, RelationsDecl, type RemoveEnumValue, RemovedValueAsDefaultError, type RenameCandidates, type RenameColumn, type RenameHints, type RenameTable, type ResolvedRelation, type ResolvedRelations, type ReversedSummary, type ReviewResult, type RollbackSummary, Rule, type RuleFor, type RunnerOptions, type SchemaDiffSummary, type SchemaSnapshot, type SchemaToRelationsRegister, type SchemaToTypes, type SeedFakeOptions, type SeedResult, SerializationFailureError, type SetColumnComment, type SetRowLevelSecurity, type SetTableComment, type Sql, type SqlBool, type SqliteIntrospectDb, SqliteRebuildRequiredError, type StatusEntry, type StringRule, TableBase, type TableClass, TableConstraint, TableDecl, TableDefinition, TableOptions, type TableQueryNamespace, type TableRelations, type TableSnapshot, Tenancy, TenancyOptions, TenancyStrategy, type TenantMigrationResult, TenantRequiredError, ThroughSpec, TimestampBuilder, type TransactionEvent, TransactionFinishedError, type TransactionOptions, type TransactionRetryEvent, type TransactionRollbackEvent, type TypedColumnRef, type TypedColumnRefs, UniqueViolationError, UnreviewedMigrationError, type UpsertOptions, UuidBuilder, ViewDecl, ViewMarks, ViewOptions, type WithClause, alias, and, appendJournalEntry, asc, between, bigSerial, bigint, boolean, buildTable, buildView, bytea, char, check, checkDrift, checkMigrations, computeMigrationHash, createDbClient, customType, date, decimal, defineTable, defineTenancy, desc, detectCompositeReferences, diff, doublePrecision, emitMysql, emitPg, emitSqlite, enforceEnumDropGate, eq, escapeLike, exists, extractSnapshot, fakeRows, findRenameCandidates, fitIdentifier, fk, generate, gt, gte, hasAmbiguousReverse, ilike, inArray, index, integer, interval, introspectMysql, introspectPg, introspectSqlite, introspectSqliteAsync, invertChanges, isDialectTag, isNotNull, isNull, isView, json, jsonb, kickDbAdapter, like, likePattern, link, listSeeds, lockTableDdl, lockTableName, lt, lte, markDialect, migrateDown, migrateLatest, migrateRollback, migrateStatus, migrateTenants, migrateUp, migrationFiles, migrationsTableDdl, ne, not, notExists, notInArray, notLike, numeric, or, parseEnumDropHeader, primaryKey, pushSchema, pushTableName, qualifiedTableName, quoteTable, readDialectMark, readJournal, real, relations, renderSchemaSource, resolveDbConfig, reviewMigration, runSeeds, safeNullComparison, seedFake, selfRef, serial, smallSerial, smallint, sql, table, tableFromClass, tenantKey, text, time, timestamp, timestamptz, toDbName, toKeyName, translateDbError, unique, unwrapTable, uuid, varchar, verifyMigrationHash, version, view };
2
+ import { C as TableSnapshot, S as SchemaSnapshot, _ as ForeignKeySnapshot, b as RelationSnapshot, c as KICK_NOT_NULL, d as TypedColumnRefs, f as CheckSnapshot, g as FkAction, h as EnumSnapshot, i as FkSpec, l as NotNullBrand, m as Dialect, n as ColumnRef, o as GeneratedBrand, p as ColumnSnapshot, r as ColumnState, s as KICK_GENERATED, t as ColumnBuilder, u as TypedColumnRef, v as IndexSnapshot } from "./types-CBoxFMRg.mjs";
3
+ import { $ as like, $n as MysqlIntrospectDb, $r as hasAmbiguousReverse, $t as uuid, A as CustomTypeOptions, Ai as PrimaryKeyShape, An as ReversedSummary, Ar as MigrationLockError, At as TimestampBuilder, B as ThroughSpec, Bi as Casing, Bn as createDbClient, Br as NotNullViolationError, Bt as integer, C as RelationalQueryDepthError, Ci as DropColumn, Cn as ReviewResult, Cr as enforceEnumDropGate, Ct as MaterializedViewOptions, D as RelationalQueryUnknownRelationError, Di as DropPolicy, Dn as TenantMigrationResult, Dr as MigrationError, Dt as buildView, E as RelationalQueryThroughError, Ei as DropIndex, En as MigrateTenantsResult, Er as MigrationEnumDropError, Et as ViewOptions, F as RelationMany, Fi as SetRowLevelSecurity, Fn as migrateLatest, Fr as DatabaseError, Ft as bytea, G as eq, Gn as MigrationsOnBoot, Gr as ResolvedRelation, Gt as real, H as Operand, Hi as toKeyName, Hn as DB_PRIMARY, Hr as UniqueViolationError, Ht as json, I as RelationMorphOne, Ii as SetTableComment, In as migrateRollback, Ir as DatabaseErrorInfo, It as char, J as gte, Ji as DriftLogger, Jn as MigrationsLocation, Jr as CompositeQueryRunner, Jt as smallint, K as exists, Ki as resolveDbConfig, Kn as kickDbAdapter, Kr as ResolvedRelations, Kt as serial, L as RelationMorphTo, Li as renderSchemaSource, Ln as migrateStatus, Lr as DbDialect, Lt as date, M as MorphSpec, Mi as RenameColumn, Mn as RunnerOptions, Mr as UnreviewedMigrationError, Mt as bigSerial, N as MorphToSpec, Ni as RenameTable, Nn as StatusEntry, Nr as CheckViolationError, Nt as bigint, O as SchemaToRelationsRegister, Oi as DropTable, On as migrateTenants, Or as MigrationFailedError, Ot as isView, P as Relation, Pi as SetColumnComment, Pn as migrateDown, Pr as ConnectionError, Pt as boolean, Q as isNull, Qi as MigrationRow, Qn as IntrospectMysqlOptions, Qr as RemovedValueAsDefaultError, Qt as timestamptz, R as RelationOne, Ri as fitIdentifier, Rn as migrateUp, Rr as DeadlockError, Rt as decimal, S as RelationalQueryCancelledError, Si as DropCheck, Sn as pushSchema, Sr as EnumDropHeader, St as selfRef, T as RelationalQueryNotSupportedError, Ti as DropForeignKey, Tn as MigrateTenantsOptions, Tr as MigrationDriftError, Tt as ViewMarks, U as and, Ui as DbConfig, Un as DB_REPLICA, Ur as translateDbError, Ut as jsonb, V as relations, Vi as toDbName, Vn as DB_CLIENT, Vr as SerializationFailureError, Vt as interval, W as between, Wn as KickDbAdapterConfig, Wr as TransactionFinishedError, Wt as numeric, X as inArray, Xi as MigrationAdapter, Xn as CodeMigration, Xr as detectCompositeReferences, Xt as time, Y as ilike, Yi as checkDrift, Yn as migrationFiles, Yr as CompositeRef, Yt as text, Z as isNotNull, Zi as MigrationBookkeeping, Zn as MigrationDb, Zr as KickDbError, Zt as timestamp, _ as LikeMatchMode, _i as CreatePolicy, _n as SqliteRebuildRequiredError, _r as JournalEntry, _t as TableDefinition, a as RawBuilder, ai as findRenameCandidates, an as SeedFakeOptions, ar as introspectPg, at as notInArray, b as RelationalQueryAliasCollisionError, bi as CreateTable, bn as PushOptions, br as readJournal, bt as link, c as SqlBool, ci as AddEnumValue, cn as SeedResult, cr as MemoryMigrationAdapter, ct as AliasedTable, d as KICK_DIALECT, di as AlterColumn, dn as CheckResult, dr as lockTableDdl, dt as NumberRule, ei as invertChanges, en as varchar, er as introspectMysql, et as lt, f as isDialectTag, fi as AlterPrimaryKey, fn as checkMigrations, fr as lockTableName, ft as Rule, g as desc, gi as CreateEnum, gn as emitMysql, gr as Journal, gt as TableClass, h as asc, hi as ChangeSet, hn as generate, hr as quoteTable, ht as TableBase, i as KyselyPlugin, ii as diff, in as FakeRowsOptions, ir as introspectSqliteAsync, it as notExists, j as customType, ji as RemoveEnumValue, jn as RollbackSummary, jr as SchemaDiffSummary, jt as UuidBuilder, k as CustomColumnBuilder, ki as DropView, kn as AppliedSummary, kr as MigrationHashError, kt as view, l as sql, li as AddForeignKey, ln as listSeeds, lr as KICK_LOCK_TABLE, lt as alias, m as readDialectMark, mi as Change, mn as GenerateResult, mr as pushTableName, mt as StringRule, n as ExpressionBuilder, ni as RenameCandidates, nn as FakeContext, nr as SqliteIntrospectDb, nt as ne, o as ReadonlyKysely, oi as AddCheck, on as fakeRows, or as IntrospectPgOptions, ot as notLike, p as markDialect, pi as AlterRole, pn as GenerateOptions, pr as migrationsTableDdl, pt as RuleFor, q as gt, qi as DriftBehavior, qn as MigrationFiles, qr as CompositeEnumReferenceError, qt as smallSerial, r as Kysely, ri as RenameHints, rn as FakeOverride, rr as introspectSqlite, rt as not, s as Sql, si as AddColumn, sn as seedFake, sr as PgQueryRunner, st as or, t as Expression, ti as DiffOptions, tn as version, tr as IntrospectSqliteOptions, tt as lte, u as DialectTag, ui as AddIndex, un as runSeeds, ur as KICK_MIGRATIONS_TABLE, ut as ClassRefs, v as escapeLike, vi as CreateRole, vn as emitSqlite, vr as appendJournalEntry, vt as defineTable, w as RelationalQueryMissingInverseError, wi as DropEnum, wn as reviewMigration, wr as parseEnumDropHeader, wt as ViewDecl, x as RelationalQueryAmbiguousRelationNameError, xi as CreateView, xn as PushResult, xr as verifyMigrationHash, xt as tableFromClass, y as likePattern, yi as CreateSchema, yn as emitPg, yr as computeMigrationHash, yt as fk, z as RelationsDecl, zi as extractSnapshot, zn as safeNullComparison, zr as ForeignKeyViolationError, zt as doublePrecision } from "./index-CV7dszi7.mjs";
4
+ import { A as TenancyStrategy, C as WithClause, D as BypassOptions, E as BypassInfo, F as ExtensionDefinition, I as ModelExtensions, L as FindOrCreateOptions, M as defineTenancy, N as tenantKey, O as Tenancy, P as ExtendedClient, R as UpsertOptions, S as TableRelations, T as RegisteredDB, _ as KickDbRelationsRegister, a as ManualTransaction, b as RelationMapEntry, c as ReadRoute, d as TransactionEvent, f as TransactionOptions, g as FindManyRow, h as FindManyOptions, i as KickDbClientEvents, j as TenantRequiredError, k as TenancyOptions, l as ReadRouter, m as TransactionRollbackEvent, n as CreateDbClientOptions, o as QueryErrorEvent, p as TransactionRetryEvent, r as KickDbClient, s as QueryEvent, t as BeforeQueryEvent, v as QueryNamespace, w as KickDbRegister, x as TableQueryNamespace, y as RegisteredRelations, z as InsertManyOptions } from "./types-BosmVkt_.mjs";
5
+ import { a as qualifiedTableName, c as CheckDecl, d as PrimaryKeyDecl, f as TableConstraint, g as unique, h as primaryKey, i as buildTable, l as IndexDecl, m as index, n as TableDecl, o as table, p as check, r as TableOptions, s as unwrapTable, t as QualifiedName, u as IndexKey } from "./table-xb127l8S.mjs";
6
+ import { t as SchemaToTypes } from "./schema-types-BMUMDpUC.mjs";
7
+ export { type AddCheck, type AddColumn, type AddEnumValue, type AddForeignKey, type AddIndex, type AliasedTable, type AlterColumn, type AlterPrimaryKey, type AlterRole, type AppliedSummary, type BeforeQueryEvent, BypassInfo, BypassOptions, type Casing, type Change, type ChangeSet, CheckDecl, type CheckResult, type CheckSnapshot, CheckViolationError, type ClassRefs, type CodeMigration, ColumnBuilder, type ColumnRef, type ColumnSnapshot, type ColumnState, CompositeEnumReferenceError, type CompositeQueryRunner, type CompositeRef, ConnectionError, type CreateDbClientOptions, type CreateEnum, type CreatePolicy, type CreateRole, type CreateSchema, type CreateTable, type CreateView, CustomColumnBuilder, type CustomTypeOptions, DB_CLIENT, DB_PRIMARY, DB_REPLICA, DatabaseError, type DatabaseErrorInfo, type DbConfig, type DbDialect, DeadlockError, type Dialect, type DialectTag, type DiffOptions, type DriftBehavior, type DriftLogger, type DropCheck, type DropColumn, type DropEnum, type DropForeignKey, type DropIndex, type DropPolicy, type DropTable, type DropView, type EnumDropHeader, type EnumSnapshot, type Expression, type ExpressionBuilder, type ExtendedClient, type ExtensionDefinition, type FakeContext, type FakeOverride, type FakeRowsOptions, type FindManyOptions, type FindManyRow, type FindOrCreateOptions, type FkAction, type FkSpec, type ForeignKeySnapshot, ForeignKeyViolationError, type GenerateOptions, type GenerateResult, type GeneratedBrand, IndexDecl, IndexKey, type IndexSnapshot, type InsertManyOptions, type IntrospectMysqlOptions, type IntrospectPgOptions, type IntrospectSqliteOptions, type Journal, type JournalEntry, KICK_DIALECT, KICK_GENERATED, KICK_LOCK_TABLE, KICK_MIGRATIONS_TABLE, KICK_NOT_NULL, type KickDbAdapterConfig, type KickDbClient, type KickDbClientEvents, KickDbError, type KickDbRegister, type KickDbRelationsRegister, Kysely, type KyselyPlugin, type LikeMatchMode, type ManualTransaction, MaterializedViewOptions, MemoryMigrationAdapter, type MigrateTenantsOptions, type MigrateTenantsResult, type MigrationAdapter, type MigrationBookkeeping, type MigrationDb, MigrationDriftError, MigrationEnumDropError, MigrationError, MigrationFailedError, type MigrationFiles, MigrationHashError, MigrationLockError, type MigrationRow, type MigrationsLocation, type MigrationsOnBoot, type ModelExtensions, MorphSpec, MorphToSpec, type MysqlIntrospectDb, type NotNullBrand, NotNullViolationError, type NumberRule, Operand, type PgQueryRunner, PrimaryKeyDecl, type PrimaryKeyShape, type PushOptions, type PushResult, QualifiedName, type QueryErrorEvent, type QueryEvent, type QueryNamespace, type RawBuilder, type ReadRoute, type ReadRouter, type ReadonlyKysely, type RegisteredDB, type RegisteredRelations, Relation, RelationMany, type RelationMapEntry, RelationMorphOne, RelationMorphTo, RelationOne, type RelationSnapshot, RelationalQueryAliasCollisionError, RelationalQueryAmbiguousRelationNameError, RelationalQueryCancelledError, RelationalQueryDepthError, RelationalQueryMissingInverseError, RelationalQueryNotSupportedError, RelationalQueryThroughError, RelationalQueryUnknownRelationError, RelationsDecl, type RemoveEnumValue, RemovedValueAsDefaultError, type RenameCandidates, type RenameColumn, type RenameHints, type RenameTable, type ResolvedRelation, type ResolvedRelations, type ReversedSummary, type ReviewResult, type RollbackSummary, Rule, type RuleFor, type RunnerOptions, type SchemaDiffSummary, type SchemaSnapshot, type SchemaToRelationsRegister, type SchemaToTypes, type SeedFakeOptions, type SeedResult, SerializationFailureError, type SetColumnComment, type SetRowLevelSecurity, type SetTableComment, type Sql, type SqlBool, type SqliteIntrospectDb, SqliteRebuildRequiredError, type StatusEntry, type StringRule, TableBase, type TableClass, TableConstraint, TableDecl, TableDefinition, TableOptions, type TableQueryNamespace, type TableRelations, type TableSnapshot, Tenancy, TenancyOptions, TenancyStrategy, type TenantMigrationResult, TenantRequiredError, ThroughSpec, TimestampBuilder, type TransactionEvent, TransactionFinishedError, type TransactionOptions, type TransactionRetryEvent, type TransactionRollbackEvent, type TypedColumnRef, type TypedColumnRefs, UniqueViolationError, UnreviewedMigrationError, type UpsertOptions, UuidBuilder, ViewDecl, ViewMarks, ViewOptions, type WithClause, alias, and, appendJournalEntry, asc, between, bigSerial, bigint, boolean, buildTable, buildView, bytea, char, check, checkDrift, checkMigrations, computeMigrationHash, createDbClient, customType, date, decimal, defineTable, defineTenancy, desc, detectCompositeReferences, diff, doublePrecision, emitMysql, emitPg, emitSqlite, enforceEnumDropGate, eq, escapeLike, exists, extractSnapshot, fakeRows, findRenameCandidates, fitIdentifier, fk, generate, gt, gte, hasAmbiguousReverse, ilike, inArray, index, integer, interval, introspectMysql, introspectPg, introspectSqlite, introspectSqliteAsync, invertChanges, isDialectTag, isNotNull, isNull, isView, json, jsonb, kickDbAdapter, like, likePattern, link, listSeeds, lockTableDdl, lockTableName, lt, lte, markDialect, migrateDown, migrateLatest, migrateRollback, migrateStatus, migrateTenants, migrateUp, migrationFiles, migrationsTableDdl, ne, not, notExists, notInArray, notLike, numeric, or, parseEnumDropHeader, primaryKey, pushSchema, pushTableName, qualifiedTableName, quoteTable, readDialectMark, readJournal, real, relations, renderSchemaSource, resolveDbConfig, reviewMigration, runSeeds, safeNullComparison, seedFake, selfRef, serial, smallSerial, smallint, sql, table, tableFromClass, tenantKey, text, time, timestamp, timestamptz, toDbName, toKeyName, translateDbError, unique, unwrapTable, uuid, varchar, verifyMigrationHash, version, view };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-db v8.7.1
2
+ * @forinda/kickjs-db v8.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,4 +8,4 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{$ as RelationalQueryAliasCollisionError,A as MigrationError,B as DeadlockError,C as verifyMigrationHash,D as emitPg,E as parseEnumDropHeader,F as TransactionFinishedError,G as translateDbError,H as NotNullViolationError,K as diff,L as CheckViolationError,M as MigrationHashError,N as MigrationLockError,O as MigrationDriftError,P as UnreviewedMigrationError,Q as toKeyName,R as ConnectionError,S as readJournal,T as enforceEnumDropGate,U as SerializationFailureError,V as ForeignKeyViolationError,W as UniqueViolationError,Y as extractSnapshot,Z as toDbName,_ as emitMysql,_t as buildTable,a as markDialect,at as RelationalQueryThroughError,b as appendJournalEntry,bt as unwrapTable,c as defineTenancy,ct as RemovedValueAsDefaultError,d as migrateLatest,et as RelationalQueryAmbiguousRelationNameError,f as migrateRollback,g as checkDrift,gt as view,h as migrationFiles,ht as isView,i as isDialectTag,it as RelationalQueryNotSupportedError,j as MigrationFailedError,k as MigrationEnumDropError,l as tenantKey,m as migrateUp,mt as buildView,n as KICK_DIALECT,nt as RelationalQueryDepthError,o as readDialectMark,ot as RelationalQueryUnknownRelationError,p as migrateStatus,q as findRenameCandidates,rt as RelationalQueryMissingInverseError,s as TenantRequiredError,st as KickDbError,t as createDbClient,tt as RelationalQueryCancelledError,u as migrateDown,v as SqliteRebuildRequiredError,vt as qualifiedTableName,wt as fitIdentifier,x as computeMigrationHash,xt as selfRef,y as emitSqlite,yt as table,z as DatabaseError}from"./create-C_rIYE5P.mjs";import{$ as interval,A as index,At as introspectSqlite,Bt as quoteTable,C as notExists,Ct as migrateTenants,D as alias,Dt as DB_REPLICA,E as or,Et as DB_PRIMARY,F as TableDefinition,Ft as KICK_MIGRATIONS_TABLE,G as bigint,Gt as renderSchemaSource,H as TimestampBuilder,Ht as detectCompositeReferences,I as defineTable,It as lockTableDdl,J as char,K as boolean,L as fk,Lt as lockTableName,M as unique,Mt as introspectPg,N as Rule,Nt as MemoryMigrationAdapter,O as IndexDecl,Ot as kickDbAdapter,P as TableBase,Pt as KICK_LOCK_TABLE,Q as integer,R as link,Rt as migrationsTableDdl,S as not,St as reviewMigration,T as notLike,Tt as DB_CLIENT,U as UuidBuilder,Ut as hasAmbiguousReverse,Vt as CompositeEnumReferenceError,W as bigSerial,Wt as invertChanges,X as decimal,Y as date,Z as doublePrecision,_ as isNull,_t as runSeeds,a as escapeLike,at as smallSerial,b as lte,bt as pushSchema,c as and,ct as time,d as exists,dt as uuid,et as json,f as gt,ft as varchar,g as isNotNull,gt as listSeeds,h as inArray,ht as seedFake,i as desc,it as serial,j as primaryKey,jt as introspectSqliteAsync,k as check,kt as introspectMysql,l as between,lt as timestamp,m as ilike,mt as fakeRows,n as sql,nt as numeric,o as likePattern,ot as smallint,p as gte,pt as version,q as bytea,r as asc,rt as real,s as relations,st as text,t as Kysely,tt as jsonb,u as eq,ut as timestamptz,v as like,vt as checkMigrations,w as notInArray,wt as safeNullComparison,x as ne,xt as generate,y as lt,yt as resolveDbConfig,z as tableFromClass,zt as pushTableName}from"./src-9T0BuJCO.mjs";import{a as KICK_NOT_NULL,i as KICK_GENERATED,n as customType,r as ColumnBuilder,t as CustomColumnBuilder}from"./custom-type-C0Am_FkE.mjs";export{CheckViolationError,ColumnBuilder,CompositeEnumReferenceError,ConnectionError,CustomColumnBuilder,DB_CLIENT,DB_PRIMARY,DB_REPLICA,DatabaseError,DeadlockError,ForeignKeyViolationError,IndexDecl,KICK_DIALECT,KICK_GENERATED,KICK_LOCK_TABLE,KICK_MIGRATIONS_TABLE,KICK_NOT_NULL,KickDbError,Kysely,MemoryMigrationAdapter,MigrationDriftError,MigrationEnumDropError,MigrationError,MigrationFailedError,MigrationHashError,MigrationLockError,NotNullViolationError,RelationalQueryAliasCollisionError,RelationalQueryAmbiguousRelationNameError,RelationalQueryCancelledError,RelationalQueryDepthError,RelationalQueryMissingInverseError,RelationalQueryNotSupportedError,RelationalQueryThroughError,RelationalQueryUnknownRelationError,RemovedValueAsDefaultError,Rule,SerializationFailureError,SqliteRebuildRequiredError,TableBase,TableDefinition,TenantRequiredError,TimestampBuilder,TransactionFinishedError,UniqueViolationError,UnreviewedMigrationError,UuidBuilder,alias,and,appendJournalEntry,asc,between,bigSerial,bigint,boolean,buildTable,buildView,bytea,char,check,checkDrift,checkMigrations,computeMigrationHash,createDbClient,customType,date,decimal,defineTable,defineTenancy,desc,detectCompositeReferences,diff,doublePrecision,emitMysql,emitPg,emitSqlite,enforceEnumDropGate,eq,escapeLike,exists,extractSnapshot,fakeRows,findRenameCandidates,fitIdentifier,fk,generate,gt,gte,hasAmbiguousReverse,ilike,inArray,index,integer,interval,introspectMysql,introspectPg,introspectSqlite,introspectSqliteAsync,invertChanges,isDialectTag,isNotNull,isNull,isView,json,jsonb,kickDbAdapter,like,likePattern,link,listSeeds,lockTableDdl,lockTableName,lt,lte,markDialect,migrateDown,migrateLatest,migrateRollback,migrateStatus,migrateTenants,migrateUp,migrationFiles,migrationsTableDdl,ne,not,notExists,notInArray,notLike,numeric,or,parseEnumDropHeader,primaryKey,pushSchema,pushTableName,qualifiedTableName,quoteTable,readDialectMark,readJournal,real,relations,renderSchemaSource,resolveDbConfig,reviewMigration,runSeeds,safeNullComparison,seedFake,selfRef,serial,smallSerial,smallint,sql,table,tableFromClass,tenantKey,text,time,timestamp,timestamptz,toDbName,toKeyName,translateDbError,unique,unwrapTable,uuid,varchar,verifyMigrationHash,version,view};
11
+ import{$ as toDbName,A as MigrationDriftError,B as ConnectionError,C as verifyMigrationHash,Ct as selfRef,D as emitPg,E as parseEnumDropHeader,Et as fitIdentifier,F as MigrationLockError,G as SerializationFailureError,H as DeadlockError,I as UnreviewedMigrationError,J as diff,K as UniqueViolationError,L as TransactionFinishedError,M as MigrationError,N as MigrationFailedError,P as MigrationHashError,S as readJournal,St as unwrapTable,T as enforceEnumDropGate,U as ForeignKeyViolationError,V as DatabaseError,W as NotNullViolationError,Y as findRenameCandidates,Z as extractSnapshot,_ as emitMysql,_t as isView,a as markDialect,at as RelationalQueryMissingInverseError,b as appendJournalEntry,bt as qualifiedTableName,c as defineTenancy,ct as RelationalQueryUnknownRelationError,d as migrateLatest,et as toKeyName,f as migrateRollback,g as checkDrift,gt as buildView,h as migrationFiles,i as isDialectTag,it as RelationalQueryDepthError,j as MigrationEnumDropError,l as tenantKey,lt as KickDbError,m as migrateUp,n as KICK_DIALECT,nt as RelationalQueryAmbiguousRelationNameError,o as readDialectMark,ot as RelationalQueryNotSupportedError,p as migrateStatus,q as translateDbError,rt as RelationalQueryCancelledError,s as TenantRequiredError,st as RelationalQueryThroughError,t as createDbClient,tt as RelationalQueryAliasCollisionError,u as migrateDown,ut as RemovedValueAsDefaultError,v as SqliteRebuildRequiredError,vt as view,x as computeMigrationHash,xt as table,y as emitSqlite,yt as buildTable,z as CheckViolationError}from"./create-vlNsemtQ.mjs";import{$ as interval,A as index,At as introspectSqlite,Bt as quoteTable,C as notExists,Ct as migrateTenants,D as alias,Dt as DB_REPLICA,E as or,Et as DB_PRIMARY,F as TableDefinition,Ft as KICK_MIGRATIONS_TABLE,G as bigint,Gt as renderSchemaSource,H as TimestampBuilder,Ht as detectCompositeReferences,I as defineTable,It as lockTableDdl,J as char,K as boolean,L as fk,Lt as lockTableName,M as unique,Mt as introspectPg,N as Rule,Nt as MemoryMigrationAdapter,O as IndexDecl,Ot as kickDbAdapter,P as TableBase,Pt as KICK_LOCK_TABLE,Q as integer,R as link,Rt as migrationsTableDdl,S as not,St as reviewMigration,T as notLike,Tt as DB_CLIENT,U as UuidBuilder,Ut as hasAmbiguousReverse,Vt as CompositeEnumReferenceError,W as bigSerial,Wt as invertChanges,X as decimal,Y as date,Z as doublePrecision,_ as isNull,_t as runSeeds,a as escapeLike,at as smallSerial,b as lte,bt as pushSchema,c as and,ct as time,d as exists,dt as uuid,et as json,f as gt,ft as varchar,g as isNotNull,gt as listSeeds,h as inArray,ht as seedFake,i as desc,it as serial,j as primaryKey,jt as introspectSqliteAsync,k as check,kt as introspectMysql,l as between,lt as timestamp,m as ilike,mt as fakeRows,n as sql,nt as numeric,o as likePattern,ot as smallint,p as gte,pt as version,q as bytea,r as asc,rt as real,s as relations,st as text,t as Kysely,tt as jsonb,u as eq,ut as timestamptz,v as like,vt as checkMigrations,w as notInArray,wt as safeNullComparison,x as ne,xt as generate,y as lt,yt as resolveDbConfig,z as tableFromClass,zt as pushTableName}from"./src-CvN0zCJi.mjs";import{a as KICK_NOT_NULL,i as KICK_GENERATED,n as customType,r as ColumnBuilder,t as CustomColumnBuilder}from"./custom-type-BSqxHyIa.mjs";export{CheckViolationError,ColumnBuilder,CompositeEnumReferenceError,ConnectionError,CustomColumnBuilder,DB_CLIENT,DB_PRIMARY,DB_REPLICA,DatabaseError,DeadlockError,ForeignKeyViolationError,IndexDecl,KICK_DIALECT,KICK_GENERATED,KICK_LOCK_TABLE,KICK_MIGRATIONS_TABLE,KICK_NOT_NULL,KickDbError,Kysely,MemoryMigrationAdapter,MigrationDriftError,MigrationEnumDropError,MigrationError,MigrationFailedError,MigrationHashError,MigrationLockError,NotNullViolationError,RelationalQueryAliasCollisionError,RelationalQueryAmbiguousRelationNameError,RelationalQueryCancelledError,RelationalQueryDepthError,RelationalQueryMissingInverseError,RelationalQueryNotSupportedError,RelationalQueryThroughError,RelationalQueryUnknownRelationError,RemovedValueAsDefaultError,Rule,SerializationFailureError,SqliteRebuildRequiredError,TableBase,TableDefinition,TenantRequiredError,TimestampBuilder,TransactionFinishedError,UniqueViolationError,UnreviewedMigrationError,UuidBuilder,alias,and,appendJournalEntry,asc,between,bigSerial,bigint,boolean,buildTable,buildView,bytea,char,check,checkDrift,checkMigrations,computeMigrationHash,createDbClient,customType,date,decimal,defineTable,defineTenancy,desc,detectCompositeReferences,diff,doublePrecision,emitMysql,emitPg,emitSqlite,enforceEnumDropGate,eq,escapeLike,exists,extractSnapshot,fakeRows,findRenameCandidates,fitIdentifier,fk,generate,gt,gte,hasAmbiguousReverse,ilike,inArray,index,integer,interval,introspectMysql,introspectPg,introspectSqlite,introspectSqliteAsync,invertChanges,isDialectTag,isNotNull,isNull,isView,json,jsonb,kickDbAdapter,like,likePattern,link,listSeeds,lockTableDdl,lockTableName,lt,lte,markDialect,migrateDown,migrateLatest,migrateRollback,migrateStatus,migrateTenants,migrateUp,migrationFiles,migrationsTableDdl,ne,not,notExists,notInArray,notLike,numeric,or,parseEnumDropHeader,primaryKey,pushSchema,pushTableName,qualifiedTableName,quoteTable,readDialectMark,readJournal,real,relations,renderSchemaSource,resolveDbConfig,reviewMigration,runSeeds,safeNullComparison,seedFake,selfRef,serial,smallSerial,smallint,sql,table,tableFromClass,tenantKey,text,time,timestamp,timestamptz,toDbName,toKeyName,translateDbError,unique,unwrapTable,uuid,varchar,verifyMigrationHash,version,view};
package/dist/mysql.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
- import { t as ColumnBuilder } from "./types-DtX5fIbn.mjs";
3
- import { Ki as MigrationAdapter } from "./index-DH4qiCqU.mjs";
2
+ import { t as ColumnBuilder } from "./types-CBoxFMRg.mjs";
3
+ import { Xi as MigrationAdapter } from "./index-CV7dszi7.mjs";
4
4
  import { Dialect } from "kysely";
5
5
  //#region src/adapters/mysql/adapter.d.ts
6
6
  /**
package/dist/mysql.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-db v8.7.1
2
+ * @forinda/kickjs-db v8.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{a as markDialect,r as KICK_DIALECT_DATES,st as KickDbError}from"./create-C_rIYE5P.mjs";import{Bt as quoteTable,It as lockTableDdl,Lt as lockTableName,Rt as migrationsTableDdl,kt as introspectMysql,zt as pushTableName}from"./src-9T0BuJCO.mjs";import{r as ColumnBuilder}from"./custom-type-C0Am_FkE.mjs";import{t as splitSqlStatements}from"./split-statements-DbK3GeXD.mjs";import{Kysely,MysqlDialect}from"kysely";function mysqlDialect(opts){let raw=opts.pool,callbackPool=typeof raw.pool?.getConnection==`function`?raw.pool:opts.pool,dialect=markDialect(new MysqlDialect({pool:callbackPool}),`mysql`),config=callbackPool.config?.connectionConfig,dates={timezone:config?.timezone??`local`,dateStrings:config?.dateStrings??!1};return Object.defineProperty(dialect,KICK_DIALECT_DATES,{value:dates,enumerable:!1}),dialect}function parseMysqlVersion(version){let trimmed=version.trim();if(/MariaDB/i.test(trimmed)){let m=/(\d+)\.(\d+)(?:\.\d+)?-MariaDB/i.exec(trimmed);if(m){let major=Number(m[1]),minor=Number(m[2]);if(Number.isFinite(major)&&Number.isFinite(minor))return{flavor:`mariadb`,major,minor}}let fallback=/^(\d+)\.(\d+)/.exec(trimmed);if(!fallback)return null;let major=Number(fallback[1]),minor=Number(fallback[2]);return!Number.isFinite(major)||!Number.isFinite(minor)?null:{flavor:`mariadb`,major,minor}}let m=/^(\d+)\.(\d+)/.exec(trimmed);if(!m)return null;let major=Number(m[1]),minor=Number(m[2]);return!Number.isFinite(major)||!Number.isFinite(minor)?null:{flavor:`mysql`,major,minor}}function parseMysqlMajorVersion(version){return parseMysqlVersion(version)?.major??null}function checkVersionSupport(parsed,raw){return parsed==null?`unparseable version string: ${raw||`<empty>`}`:parsed.flavor===`mariadb`?parsed.major>10?null:parsed.major<10||parsed.minor<5?`MariaDB 10.5+ required (detected: ${raw})`:null:parsed.major<8?`MySQL 8.0+ required (detected: ${raw})`:null}function splitMysqlStatements(sql){return splitSqlStatements(sql,`mysql`)}function mysqlAdapter(opts){if(opts.endPoolOnClose&&typeof opts.pool.end!=`function`)throw new KickDbError(`KICK_DB_POOL_NOT_CLOSABLE`,`mysqlAdapter({ endPoolOnClose: true }) needs a pool with an end() method to close`);let dialect=`mysql`,{pool}=opts,versionVerified=!1;async function assertVersion(){if(versionVerified)return;let[rows]=await pool.query("SELECT VERSION() AS `version`"),versionString=rows[0]?.version??``,failure=checkVersionSupport(parseMysqlVersion(versionString),versionString);if(failure)throw new KickDbError(`KICK_DB_RELATIONAL_NOT_SUPPORTED`,`${failure}. JSON_ARRAYAGG (required by the relational query layer) shipped in MySQL 8.0 and MariaDB 10.5. Use layer-1/layer-2 queries (selectFrom / selectAll) on older versions.`);versionVerified=!0}async function runStatements(sql){for(let stmt of splitMysqlStatements(sql))await pool.query(stmt)}async function runStatementsOnConn(conn,sql){for(let stmt of splitMysqlStatements(sql))await conn.query(stmt)}let table=opts.migrationsTable??`kick_migrations`,T=quoteTable(dialect,table),L=quoteTable(dialect,lockTableName(table)),bookkeepingTables=[table,lockTableName(table),pushTableName(table)],migrationDb;return{dialect,async ensureMigrationTables(){await assertVersion(),await runStatements(migrationsTableDdl(dialect,table)),await runStatements(lockTableDdl(dialect,table))},async listApplied(){let[rows]=await pool.query(`SELECT id, name, hash, batch, applied_at, direction
11
+ import{a as markDialect,lt as KickDbError,r as KICK_DIALECT_DATES}from"./create-vlNsemtQ.mjs";import{Bt as quoteTable,It as lockTableDdl,Lt as lockTableName,Rt as migrationsTableDdl,kt as introspectMysql,zt as pushTableName}from"./src-CvN0zCJi.mjs";import{r as ColumnBuilder}from"./custom-type-BSqxHyIa.mjs";import{t as splitSqlStatements}from"./split-statements-CJIglzao.mjs";import{Kysely,MysqlDialect}from"kysely";function mysqlDialect(opts){let raw=opts.pool,callbackPool=typeof raw.pool?.getConnection==`function`?raw.pool:opts.pool,dialect=markDialect(new MysqlDialect({pool:callbackPool}),`mysql`),config=callbackPool.config?.connectionConfig,dates={timezone:config?.timezone??`local`,dateStrings:config?.dateStrings??!1};return Object.defineProperty(dialect,KICK_DIALECT_DATES,{value:dates,enumerable:!1}),dialect}function parseMysqlVersion(version){let trimmed=version.trim();if(/MariaDB/i.test(trimmed)){let m=/(\d+)\.(\d+)(?:\.\d+)?-MariaDB/i.exec(trimmed);if(m){let major=Number(m[1]),minor=Number(m[2]);if(Number.isFinite(major)&&Number.isFinite(minor))return{flavor:`mariadb`,major,minor}}let fallback=/^(\d+)\.(\d+)/.exec(trimmed);if(!fallback)return null;let major=Number(fallback[1]),minor=Number(fallback[2]);return!Number.isFinite(major)||!Number.isFinite(minor)?null:{flavor:`mariadb`,major,minor}}let m=/^(\d+)\.(\d+)/.exec(trimmed);if(!m)return null;let major=Number(m[1]),minor=Number(m[2]);return!Number.isFinite(major)||!Number.isFinite(minor)?null:{flavor:`mysql`,major,minor}}function parseMysqlMajorVersion(version){return parseMysqlVersion(version)?.major??null}function checkVersionSupport(parsed,raw){return parsed==null?`unparseable version string: ${raw||`<empty>`}`:parsed.flavor===`mariadb`?parsed.major>10?null:parsed.major<10||parsed.minor<5?`MariaDB 10.5+ required (detected: ${raw})`:null:parsed.major<8?`MySQL 8.0+ required (detected: ${raw})`:null}function splitMysqlStatements(sql){return splitSqlStatements(sql,`mysql`)}function mysqlAdapter(opts){if(opts.endPoolOnClose&&typeof opts.pool.end!=`function`)throw new KickDbError(`KICK_DB_POOL_NOT_CLOSABLE`,`mysqlAdapter({ endPoolOnClose: true }) needs a pool with an end() method to close`);let dialect=`mysql`,{pool}=opts,versionVerified=!1;async function assertVersion(){if(versionVerified)return;let[rows]=await pool.query("SELECT VERSION() AS `version`"),versionString=rows[0]?.version??``,failure=checkVersionSupport(parseMysqlVersion(versionString),versionString);if(failure)throw new KickDbError(`KICK_DB_RELATIONAL_NOT_SUPPORTED`,`${failure}. JSON_ARRAYAGG (required by the relational query layer) shipped in MySQL 8.0 and MariaDB 10.5. Use layer-1/layer-2 queries (selectFrom / selectAll) on older versions.`);versionVerified=!0}async function runStatements(sql){for(let stmt of splitMysqlStatements(sql))await pool.query(stmt)}async function runStatementsOnConn(conn,sql){for(let stmt of splitMysqlStatements(sql))await conn.query(stmt)}let table=opts.migrationsTable??`kick_migrations`,T=quoteTable(dialect,table),L=quoteTable(dialect,lockTableName(table)),bookkeepingTables=[table,lockTableName(table),pushTableName(table)],migrationDb;return{dialect,async ensureMigrationTables(){await assertVersion(),await runStatements(migrationsTableDdl(dialect,table)),await runStatements(lockTableDdl(dialect,table))},async listApplied(){let[rows]=await pool.query(`SELECT id, name, hash, batch, applied_at, direction
12
12
  FROM ${T}
13
13
  ORDER BY applied_at ASC, id ASC`);return rows.map(row=>({id:row.id,name:row.name,hash:row.hash,batch:Number(row.batch),appliedAt:row.applied_at instanceof Date?row.applied_at.toISOString():String(row.applied_at),direction:row.direction}))},async recordApplied(row){await pool.query(`INSERT INTO ${T} (id, name, hash, batch, direction)
14
14
  VALUES (?, ?, ?, ?, ?)`,[row.id,row.name,row.hash,row.batch,row.direction])},async removeApplied(id){await pool.query(`DELETE FROM ${T} WHERE id = ?`,[id])},async acquireLock(owner){let[result]=await pool.query(`UPDATE ${L}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-db v8.7.1
2
+ * @forinda/kickjs-db v8.9.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{r as ColumnBuilder,t as CustomColumnBuilder}from"./custom-type-C0Am_FkE.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`)}var PgCodecColumnBuilder=class extends CustomColumnBuilder{};const vectorToDriver=v=>`[${v.join(`,`)}]`,vectorFromDriver=raw=>typeof raw==`string`?JSON.parse(raw):raw;function vectorColumn(base,dim){return new PgCodecColumnBuilder({dataType:()=>dim===void 0?base:`${base}(${dim})`,toDriver:vectorToDriver,fromDriver:vectorFromDriver})}function vector(dim){return vectorColumn(`vector`,dim)}function halfvec(dim){return vectorColumn(`halfvec`,dim)}const pointToDriver=p=>`(${p.x},${p.y})`,pointFromDriver=raw=>{if(typeof raw!=`string`)return raw;let[x,y]=raw.replace(/[()\s]/g,``).split(`,`).map(Number);return{x,y}};function point(){return new PgCodecColumnBuilder({dataType:()=>`point`,toDriver:pointToDriver,fromDriver:pointFromDriver})}function geometry(type,srid){let args=[type,srid].filter(a=>a!==void 0);return new ColumnBuilder(args.length?`geometry(${args.join(`, `)})`:`geometry`)}function macaddr(){return new ColumnBuilder(`macaddr`)}function macaddr8(){return new ColumnBuilder(`macaddr8`)}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{geometry as a,macaddr as c,pgEnum as d,point as f,xml as h,citext as i,macaddr8 as l,vector as m,PgEnumColumnBuilder as n,halfvec as o,tsvector as p,cidr as r,inet as s,PgCodecColumnBuilder as t,money as u};
12
- //# sourceMappingURL=pg-BjNaBIHW.mjs.map
11
+ import{r as ColumnBuilder,t as CustomColumnBuilder}from"./custom-type-BSqxHyIa.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`)}var PgCodecColumnBuilder=class extends CustomColumnBuilder{};const vectorToDriver=v=>`[${v.join(`,`)}]`,vectorFromDriver=raw=>typeof raw==`string`?JSON.parse(raw):raw;function vectorColumn(base,dim){return new PgCodecColumnBuilder({dataType:()=>dim===void 0?base:`${base}(${dim})`,toDriver:vectorToDriver,fromDriver:vectorFromDriver})}function vector(dim){return vectorColumn(`vector`,dim)}function halfvec(dim){return vectorColumn(`halfvec`,dim)}const pointToDriver=p=>`(${p.x},${p.y})`,pointFromDriver=raw=>{if(typeof raw!=`string`)return raw;let[x,y]=raw.replace(/[()\s]/g,``).split(`,`).map(Number);return{x,y}};function point(){return new PgCodecColumnBuilder({dataType:()=>`point`,toDriver:pointToDriver,fromDriver:pointFromDriver})}function geometry(type,srid){let args=[type,srid].filter(a=>a!==void 0);return new ColumnBuilder(args.length?`geometry(${args.join(`, `)})`:`geometry`)}function macaddr(){return new ColumnBuilder(`macaddr`)}function macaddr8(){return new ColumnBuilder(`macaddr8`)}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{geometry as a,macaddr as c,pgEnum as d,point as f,xml as h,citext as i,macaddr8 as l,vector as m,PgEnumColumnBuilder as n,halfvec as o,tsvector as p,cidr as r,inet as s,PgCodecColumnBuilder as t,money as u};
12
+ //# sourceMappingURL=pg-DqVxnk3O.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pg-BjNaBIHW.mjs","names":[],"sources":["../src/dsl/columns/pg.ts"],"sourcesContent":["import { CustomColumnBuilder } from '../../custom-type'\nimport { ColumnBuilder } from './types'\n\n// PG-only column types. Phantom T per builder so SchemaToTypes<S> can narrow\n// each column to a useful TS shape — strings for the text-y types, number[]\n// for vector embeddings, etc.\n\n/**\n * Declare a PostgreSQL ENUM type.\n *\n * @example\n * ```ts\n * export const taskStatus = pgEnum('task_status', 'todo', 'in_progress', 'done')\n *\n * export const tasks = table('tasks', {\n * id: uuid().primaryKey().defaultRandom(),\n * status: taskStatus().notNull().default('todo'),\n * })\n * ```\n *\n * The factory returns a column builder whose phantom type narrows to\n * the union of the declared values — `db.selectFrom('tasks').select('status')`\n * types `status: 'todo' | 'in_progress' | 'done'`.\n *\n * Schema-level state (the enum name + values) is attached to every\n * column the factory produces so introspection / drift / emit can pick\n * it up: `kick db generate` emits the `CREATE TYPE <name> AS ENUM (...)`\n * before the first table that uses it, and later value changes as\n * migrations.\n */\nexport interface PgEnumBuilder<TName extends string, TValues extends readonly string[]> {\n (): PgEnumColumnBuilder<TName, TValues>\n /** The SQL identifier — used by emit + drift detection. */\n readonly enumName: TName\n /** Allowed literal values, in declaration order. */\n readonly values: TValues\n}\n\nexport class PgEnumColumnBuilder<\n TName extends string,\n TValues extends readonly string[],\n> extends ColumnBuilder<TValues[number]> {\n /** The enum's SQL identifier — preserved for emit + drift detection. */\n readonly enumName: TName\n /** Allowed values — readonly to prevent mutation across columns. */\n readonly values: TValues\n\n constructor(enumName: TName, values: TValues) {\n // The SQL data type IS the enum identifier — `status task_status`,\n // not `status text` — so PG enforces the membership constraint.\n super(enumName)\n this.enumName = enumName\n this.values = values\n }\n}\n\n// Variadic rest forces TS to infer EACH value as its literal type, so\n// `pgEnum('s', 'todo', 'done')` resolves to\n// `PgEnumBuilder<'s', ['todo', 'done']>`. Without rest, an array\n// literal stored in a variable would widen to `string[]` and the\n// column phantom would collapse to plain `string`, defeating the\n// entire point of the helper. Adopters with a pre-existing array\n// can still spread it: `pgEnum('s', ...VALUES as const)`.\nexport function pgEnum<TName extends string, const TValues extends readonly [string, ...string[]]>(\n name: TName,\n ...values: TValues\n): PgEnumBuilder<TName, TValues> {\n const factory = (): PgEnumColumnBuilder<TName, TValues> =>\n new PgEnumColumnBuilder<TName, TValues>(name, values)\n // Attach metadata to the factory itself so introspection that walks\n // `Object.values(schema)` can discover enum declarations even when\n // they're declared standalone (without a column reference).\n return Object.assign(factory, { enumName: name, values }) as PgEnumBuilder<TName, TValues>\n}\n\nexport function tsvector(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('tsvector')\n}\n\n/**\n * A built-in column whose values the driver doesn't convert, with the codecs\n * that do. Validators still know its type (a custom type reads as \"any\").\n * Codecs are shared module-level functions: they're keyed by column name, and\n * one instance per type keeps same-named columns in different tables quiet.\n */\nexport class PgCodecColumnBuilder<T> extends CustomColumnBuilder<T> {}\n\n/** pgvector's text form is `[1,2,3]`: valid JSON both ways. */\nconst vectorToDriver = (v: number[]) => `[${v.join(',')}]`\nconst vectorFromDriver = (raw: unknown): number[] =>\n typeof raw === 'string' ? (JSON.parse(raw) as number[]) : (raw as number[])\n\nfunction vectorColumn(base: string, dim?: number): PgCodecColumnBuilder<number[]> {\n return new PgCodecColumnBuilder<number[]>({\n dataType: () => (dim === undefined ? base : `${base}(${dim})`),\n toDriver: vectorToDriver,\n fromDriver: vectorFromDriver,\n })\n}\n\n/** A pgvector embedding (`vector(n)`), as `number[]`. Needs the `vector` extension. */\nexport function vector(dim?: number): PgCodecColumnBuilder<number[]> {\n return vectorColumn('vector', dim)\n}\n\n/** A half-precision pgvector embedding (`halfvec(n)`, pgvector 0.7+), as `number[]`. */\nexport function halfvec(dim?: number): PgCodecColumnBuilder<number[]> {\n return vectorColumn('halfvec', dim)\n}\n\n/** A point on a plane. */\nexport interface PgPoint {\n x: number\n y: number\n}\n\nconst pointToDriver = (p: PgPoint) => `(${p.x},${p.y})`\nconst pointFromDriver = (raw: unknown): PgPoint => {\n if (typeof raw !== 'string') return raw as PgPoint // `pg` already parses it\n const [x, y] = raw\n .replace(/[()\\s]/g, '')\n .split(',')\n .map(Number)\n return { x: x!, y: y! }\n}\n\n/** Postgres' geometric `point`, as `{ x, y }`. */\nexport function point(): PgCodecColumnBuilder<PgPoint> {\n return new PgCodecColumnBuilder<PgPoint>({\n dataType: () => 'point',\n toDriver: pointToDriver,\n fromDriver: pointFromDriver,\n })\n}\n\n/**\n * A PostGIS geometry: `geometry('Point', 4326)` → `geometry(Point, 4326)`.\n * The value is what PostGIS returns (hex EWKB) and takes text in (WKT or\n * EWKT, `'SRID=4326;POINT(36.8 -1.28)'`); convert with `ST_AsGeoJSON` /\n * `ST_GeomFromGeoJSON` in SQL. Needs the `postgis` extension.\n */\nexport function geometry(type?: string, srid?: number): ColumnBuilder<string> {\n const args = [type, srid].filter((a) => a !== undefined)\n return new ColumnBuilder<string>(args.length ? `geometry(${args.join(', ')})` : 'geometry')\n}\n\n/** A MAC address (`08:00:2b:01:02:03`). */\nexport function macaddr(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('macaddr')\n}\n\n/** An EUI-64 MAC address. */\nexport function macaddr8(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('macaddr8')\n}\n\nexport function citext(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('citext')\n}\n\nexport function money(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('money')\n}\n\nexport function inet(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('inet')\n}\n\nexport function cidr(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('cidr')\n}\n\nexport function xml(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('xml')\n}\n"],"mappings":";;;;;;;;;;oFAsCA,IAAa,oBAAb,cAGU,aAA+B,CAEvC,SAEA,OAEA,YAAY,SAAiB,OAAiB,CAG5C,MAAM,QAAQ,EACd,KAAK,SAAW,SAChB,KAAK,OAAS,MAChB,CACF,EASA,SAAgB,OACd,KACA,GAAG,OAC4B,CAM/B,OAAO,OAAO,WAJZ,IAAI,oBAAoC,KAAM,MAAM,EAIxB,CAAE,SAAU,KAAM,MAAO,CAAC,CAC1D,CAEA,SAAgB,UAAkC,CAChD,OAAO,IAAI,cAAsB,UAAU,CAC7C,CAQA,IAAa,qBAAb,cAA6C,mBAAuB,CAAC,EAGrE,MAAM,eAAkB,GAAgB,IAAI,EAAE,KAAK,GAAG,EAAE,GAClD,iBAAoB,KACxB,OAAO,KAAQ,SAAY,KAAK,MAAM,GAAG,EAAkB,IAE7D,SAAS,aAAa,KAAc,IAA8C,CAChF,OAAO,IAAI,qBAA+B,CACxC,aAAiB,MAAQ,IAAA,GAAY,KAAO,GAAG,KAAK,GAAG,IAAI,GAC3D,SAAU,eACV,WAAY,gBACd,CAAC,CACH,CAGA,SAAgB,OAAO,IAA8C,CACnE,OAAO,aAAa,SAAU,GAAG,CACnC,CAGA,SAAgB,QAAQ,IAA8C,CACpE,OAAO,aAAa,UAAW,GAAG,CACpC,CAQA,MAAM,cAAiB,GAAe,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,GAC/C,gBAAmB,KAA0B,CACjD,GAAI,OAAO,KAAQ,SAAU,OAAO,IACpC,GAAM,CAAC,EAAG,GAAK,IACZ,QAAQ,UAAW,EAAE,CAAC,CACtB,MAAM,GAAG,CAAC,CACV,IAAI,MAAM,EACb,MAAO,CAAK,EAAO,CAAG,CACxB,EAGA,SAAgB,OAAuC,CACrD,OAAO,IAAI,qBAA8B,CACvC,aAAgB,QAChB,SAAU,cACV,WAAY,eACd,CAAC,CACH,CAQA,SAAgB,SAAS,KAAe,KAAsC,CAC5E,IAAM,KAAO,CAAC,KAAM,IAAI,CAAC,CAAC,OAAQ,GAAM,IAAM,IAAA,EAAS,EACvD,OAAO,IAAI,cAAsB,KAAK,OAAS,YAAY,KAAK,KAAK,IAAI,EAAE,GAAK,UAAU,CAC5F,CAGA,SAAgB,SAAiC,CAC/C,OAAO,IAAI,cAAsB,SAAS,CAC5C,CAGA,SAAgB,UAAkC,CAChD,OAAO,IAAI,cAAsB,UAAU,CAC7C,CAEA,SAAgB,QAAgC,CAC9C,OAAO,IAAI,cAAsB,QAAQ,CAC3C,CAEA,SAAgB,OAA+B,CAC7C,OAAO,IAAI,cAAsB,OAAO,CAC1C,CAEA,SAAgB,MAA8B,CAC5C,OAAO,IAAI,cAAsB,MAAM,CACzC,CAEA,SAAgB,MAA8B,CAC5C,OAAO,IAAI,cAAsB,MAAM,CACzC,CAEA,SAAgB,KAA6B,CAC3C,OAAO,IAAI,cAAsB,KAAK,CACxC"}
1
+ {"version":3,"file":"pg-DqVxnk3O.mjs","names":[],"sources":["../src/dsl/columns/pg.ts"],"sourcesContent":["import { CustomColumnBuilder } from '../../custom-type'\nimport { ColumnBuilder } from './types'\n\n// PG-only column types. Phantom T per builder so SchemaToTypes<S> can narrow\n// each column to a useful TS shape — strings for the text-y types, number[]\n// for vector embeddings, etc.\n\n/**\n * Declare a PostgreSQL ENUM type.\n *\n * @example\n * ```ts\n * export const taskStatus = pgEnum('task_status', 'todo', 'in_progress', 'done')\n *\n * export const tasks = table('tasks', {\n * id: uuid().primaryKey().defaultRandom(),\n * status: taskStatus().notNull().default('todo'),\n * })\n * ```\n *\n * The factory returns a column builder whose phantom type narrows to\n * the union of the declared values — `db.selectFrom('tasks').select('status')`\n * types `status: 'todo' | 'in_progress' | 'done'`.\n *\n * Schema-level state (the enum name + values) is attached to every\n * column the factory produces so introspection / drift / emit can pick\n * it up: `kick db generate` emits the `CREATE TYPE <name> AS ENUM (...)`\n * before the first table that uses it, and later value changes as\n * migrations.\n */\nexport interface PgEnumBuilder<TName extends string, TValues extends readonly string[]> {\n (): PgEnumColumnBuilder<TName, TValues>\n /** The SQL identifier — used by emit + drift detection. */\n readonly enumName: TName\n /** Allowed literal values, in declaration order. */\n readonly values: TValues\n}\n\nexport class PgEnumColumnBuilder<\n TName extends string,\n TValues extends readonly string[],\n> extends ColumnBuilder<TValues[number]> {\n /** The enum's SQL identifier — preserved for emit + drift detection. */\n readonly enumName: TName\n /** Allowed values — readonly to prevent mutation across columns. */\n readonly values: TValues\n\n constructor(enumName: TName, values: TValues) {\n // The SQL data type IS the enum identifier — `status task_status`,\n // not `status text` — so PG enforces the membership constraint.\n super(enumName)\n this.enumName = enumName\n this.values = values\n }\n}\n\n// Variadic rest forces TS to infer EACH value as its literal type, so\n// `pgEnum('s', 'todo', 'done')` resolves to\n// `PgEnumBuilder<'s', ['todo', 'done']>`. Without rest, an array\n// literal stored in a variable would widen to `string[]` and the\n// column phantom would collapse to plain `string`, defeating the\n// entire point of the helper. Adopters with a pre-existing array\n// can still spread it: `pgEnum('s', ...VALUES as const)`.\nexport function pgEnum<TName extends string, const TValues extends readonly [string, ...string[]]>(\n name: TName,\n ...values: TValues\n): PgEnumBuilder<TName, TValues> {\n const factory = (): PgEnumColumnBuilder<TName, TValues> =>\n new PgEnumColumnBuilder<TName, TValues>(name, values)\n // Attach metadata to the factory itself so introspection that walks\n // `Object.values(schema)` can discover enum declarations even when\n // they're declared standalone (without a column reference).\n return Object.assign(factory, { enumName: name, values }) as PgEnumBuilder<TName, TValues>\n}\n\nexport function tsvector(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('tsvector')\n}\n\n/**\n * A built-in column whose values the driver doesn't convert, with the codecs\n * that do. Validators still know its type (a custom type reads as \"any\").\n * Codecs are shared module-level functions: they're keyed by column name, and\n * one instance per type keeps same-named columns in different tables quiet.\n */\nexport class PgCodecColumnBuilder<T> extends CustomColumnBuilder<T> {}\n\n/** pgvector's text form is `[1,2,3]`: valid JSON both ways. */\nconst vectorToDriver = (v: number[]) => `[${v.join(',')}]`\nconst vectorFromDriver = (raw: unknown): number[] =>\n typeof raw === 'string' ? (JSON.parse(raw) as number[]) : (raw as number[])\n\nfunction vectorColumn(base: string, dim?: number): PgCodecColumnBuilder<number[]> {\n return new PgCodecColumnBuilder<number[]>({\n dataType: () => (dim === undefined ? base : `${base}(${dim})`),\n toDriver: vectorToDriver,\n fromDriver: vectorFromDriver,\n })\n}\n\n/** A pgvector embedding (`vector(n)`), as `number[]`. Needs the `vector` extension. */\nexport function vector(dim?: number): PgCodecColumnBuilder<number[]> {\n return vectorColumn('vector', dim)\n}\n\n/** A half-precision pgvector embedding (`halfvec(n)`, pgvector 0.7+), as `number[]`. */\nexport function halfvec(dim?: number): PgCodecColumnBuilder<number[]> {\n return vectorColumn('halfvec', dim)\n}\n\n/** A point on a plane. */\nexport interface PgPoint {\n x: number\n y: number\n}\n\nconst pointToDriver = (p: PgPoint) => `(${p.x},${p.y})`\nconst pointFromDriver = (raw: unknown): PgPoint => {\n if (typeof raw !== 'string') return raw as PgPoint // `pg` already parses it\n const [x, y] = raw\n .replace(/[()\\s]/g, '')\n .split(',')\n .map(Number)\n return { x: x!, y: y! }\n}\n\n/** Postgres' geometric `point`, as `{ x, y }`. */\nexport function point(): PgCodecColumnBuilder<PgPoint> {\n return new PgCodecColumnBuilder<PgPoint>({\n dataType: () => 'point',\n toDriver: pointToDriver,\n fromDriver: pointFromDriver,\n })\n}\n\n/**\n * A PostGIS geometry: `geometry('Point', 4326)` → `geometry(Point, 4326)`.\n * The value is what PostGIS returns (hex EWKB) and takes text in (WKT or\n * EWKT, `'SRID=4326;POINT(36.8 -1.28)'`); convert with `ST_AsGeoJSON` /\n * `ST_GeomFromGeoJSON` in SQL. Needs the `postgis` extension.\n */\nexport function geometry(type?: string, srid?: number): ColumnBuilder<string> {\n const args = [type, srid].filter((a) => a !== undefined)\n return new ColumnBuilder<string>(args.length ? `geometry(${args.join(', ')})` : 'geometry')\n}\n\n/** A MAC address (`08:00:2b:01:02:03`). */\nexport function macaddr(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('macaddr')\n}\n\n/** An EUI-64 MAC address. */\nexport function macaddr8(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('macaddr8')\n}\n\nexport function citext(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('citext')\n}\n\nexport function money(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('money')\n}\n\nexport function inet(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('inet')\n}\n\nexport function cidr(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('cidr')\n}\n\nexport function xml(): ColumnBuilder<string> {\n return new ColumnBuilder<string>('xml')\n}\n"],"mappings":";;;;;;;;;;oFAsCA,IAAa,oBAAb,cAGU,aAA+B,CAEvC,SAEA,OAEA,YAAY,SAAiB,OAAiB,CAG5C,MAAM,QAAQ,EACd,KAAK,SAAW,SAChB,KAAK,OAAS,MAChB,CACF,EASA,SAAgB,OACd,KACA,GAAG,OAC4B,CAM/B,OAAO,OAAO,WAJZ,IAAI,oBAAoC,KAAM,MAAM,EAIxB,CAAE,SAAU,KAAM,MAAO,CAAC,CAC1D,CAEA,SAAgB,UAAkC,CAChD,OAAO,IAAI,cAAsB,UAAU,CAC7C,CAQA,IAAa,qBAAb,cAA6C,mBAAuB,CAAC,EAGrE,MAAM,eAAkB,GAAgB,IAAI,EAAE,KAAK,GAAG,EAAE,GAClD,iBAAoB,KACxB,OAAO,KAAQ,SAAY,KAAK,MAAM,GAAG,EAAkB,IAE7D,SAAS,aAAa,KAAc,IAA8C,CAChF,OAAO,IAAI,qBAA+B,CACxC,aAAiB,MAAQ,IAAA,GAAY,KAAO,GAAG,KAAK,GAAG,IAAI,GAC3D,SAAU,eACV,WAAY,gBACd,CAAC,CACH,CAGA,SAAgB,OAAO,IAA8C,CACnE,OAAO,aAAa,SAAU,GAAG,CACnC,CAGA,SAAgB,QAAQ,IAA8C,CACpE,OAAO,aAAa,UAAW,GAAG,CACpC,CAQA,MAAM,cAAiB,GAAe,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,GAC/C,gBAAmB,KAA0B,CACjD,GAAI,OAAO,KAAQ,SAAU,OAAO,IACpC,GAAM,CAAC,EAAG,GAAK,IACZ,QAAQ,UAAW,EAAE,CAAC,CACtB,MAAM,GAAG,CAAC,CACV,IAAI,MAAM,EACb,MAAO,CAAK,EAAO,CAAG,CACxB,EAGA,SAAgB,OAAuC,CACrD,OAAO,IAAI,qBAA8B,CACvC,aAAgB,QAChB,SAAU,cACV,WAAY,eACd,CAAC,CACH,CAQA,SAAgB,SAAS,KAAe,KAAsC,CAC5E,IAAM,KAAO,CAAC,KAAM,IAAI,CAAC,CAAC,OAAQ,GAAM,IAAM,IAAA,EAAS,EACvD,OAAO,IAAI,cAAsB,KAAK,OAAS,YAAY,KAAK,KAAK,IAAI,EAAE,GAAK,UAAU,CAC5F,CAGA,SAAgB,SAAiC,CAC/C,OAAO,IAAI,cAAsB,SAAS,CAC5C,CAGA,SAAgB,UAAkC,CAChD,OAAO,IAAI,cAAsB,UAAU,CAC7C,CAEA,SAAgB,QAAgC,CAC9C,OAAO,IAAI,cAAsB,QAAQ,CAC3C,CAEA,SAAgB,OAA+B,CAC7C,OAAO,IAAI,cAAsB,OAAO,CAC1C,CAEA,SAAgB,MAA8B,CAC5C,OAAO,IAAI,cAAsB,MAAM,CACzC,CAEA,SAAgB,MAA8B,CAC5C,OAAO,IAAI,cAAsB,MAAM,CACzC,CAEA,SAAgB,KAA6B,CAC3C,OAAO,IAAI,cAAsB,KAAK,CACxC"}
package/dist/pg.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
- import { d as TypedColumnRefs, t as ColumnBuilder } from "./types-DtX5fIbn.mjs";
3
- import { Ki as MigrationAdapter, bt as ViewDecl, k as CustomColumnBuilder, yt as MaterializedViewOptions } from "./index-DH4qiCqU.mjs";
4
- import { _ as PolicyDecl, b as pgRole, n as TableDecl, r as TableOptions, v as RoleDecl, x as policy, y as isRole } from "./table-B_TVt7EC.mjs";
2
+ import { d as TypedColumnRefs, t as ColumnBuilder } from "./types-CBoxFMRg.mjs";
3
+ import { Ct as MaterializedViewOptions, Xi as MigrationAdapter, k as CustomColumnBuilder, wt as ViewDecl } from "./index-CV7dszi7.mjs";
4
+ import { _ as PolicyDecl, b as pgRole, n as TableDecl, r as TableOptions, v as RoleDecl, x as policy, y as isRole } from "./table-xb127l8S.mjs";
5
5
  import { Dialect } from "kysely";
6
6
  //#region src/dsl/columns/pg.d.ts
7
7
  /**
package/dist/pg.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @forinda/kickjs-db v8.7.1
2
+ * @forinda/kickjs-db v8.9.0
3
3
  *
4
4
  * Copyright (c) Felix Orinda
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @license MIT
10
10
  */
11
- import{a as markDialect,dt as isRole,ft as pgRole,lt as PolicyDecl,mt as buildView,pt as policy,st as KickDbError,ut as RoleDecl}from"./create-C_rIYE5P.mjs";import{B as isPgSchema,Bt as quoteTable,It as lockTableDdl,Lt as lockTableName,Mt as introspectPg,Rt as migrationsTableDdl,V as pgSchema,zt as pushTableName}from"./src-9T0BuJCO.mjs";import{a as geometry,c as macaddr,d as pgEnum,f as point,h as xml,i as citext,l as macaddr8,m as vector,n as PgEnumColumnBuilder,o as halfvec,p as tsvector,r as cidr,s as inet,t as PgCodecColumnBuilder,u as money}from"./pg-BjNaBIHW.mjs";import{Kysely,PostgresDialect}from"kysely";function pgDialect(opts){return markDialect(new PostgresDialect({pool:opts.pool,...opts.cursor?{cursor:opts.cursor}:{}}),`postgres`)}const SAFE_SCHEMA_NAME=/^[a-z_][a-z0-9_]*$/i;function pgAdapter(opts){if(opts.endPoolOnClose&&typeof opts.pool.end!=`function`)throw new KickDbError(`KICK_DB_POOL_NOT_CLOSABLE`,`pgAdapter({ endPoolOnClose: true }) needs a pool with an end() method to close`);let dialect=`postgres`,{pool}=opts,schema=opts.schema??`public`;if(!SAFE_SCHEMA_NAME.test(schema))throw Error(`Invalid PG schema name: ${schema}`);let table=opts.migrationsTable??`kick_migrations`,T=quoteTable(dialect,table),L=quoteTable(dialect,lockTableName(table)),bookkeepingTables=(table.includes(`.`)?table.slice(0,table.lastIndexOf(`.`)):schema)===schema?[table,lockTableName(table),pushTableName(table)].map(t=>t.slice(t.lastIndexOf(`.`)+1)):[],migrationDb;return{dialect,async ensureMigrationTables(){await pool.query(migrationsTableDdl(dialect,table)),await pool.query(lockTableDdl(dialect,table))},async listApplied(){return(await pool.query(`SELECT id, name, hash, batch, applied_at, direction
11
+ import{a as markDialect,dt as PolicyDecl,ft as RoleDecl,gt as buildView,ht as policy,lt as KickDbError,mt as pgRole,pt as isRole}from"./create-vlNsemtQ.mjs";import{B as isPgSchema,Bt as quoteTable,It as lockTableDdl,Lt as lockTableName,Mt as introspectPg,Rt as migrationsTableDdl,V as pgSchema,zt as pushTableName}from"./src-CvN0zCJi.mjs";import{a as geometry,c as macaddr,d as pgEnum,f as point,h as xml,i as citext,l as macaddr8,m as vector,n as PgEnumColumnBuilder,o as halfvec,p as tsvector,r as cidr,s as inet,t as PgCodecColumnBuilder,u as money}from"./pg-DqVxnk3O.mjs";import{Kysely,PostgresDialect}from"kysely";function pgDialect(opts){return markDialect(new PostgresDialect({pool:opts.pool,...opts.cursor?{cursor:opts.cursor}:{}}),`postgres`)}const SAFE_SCHEMA_NAME=/^[a-z_][a-z0-9_]*$/i;function pgAdapter(opts){if(opts.endPoolOnClose&&typeof opts.pool.end!=`function`)throw new KickDbError(`KICK_DB_POOL_NOT_CLOSABLE`,`pgAdapter({ endPoolOnClose: true }) needs a pool with an end() method to close`);let dialect=`postgres`,{pool}=opts,schema=opts.schema??`public`;if(!SAFE_SCHEMA_NAME.test(schema))throw Error(`Invalid PG schema name: ${schema}`);let table=opts.migrationsTable??`kick_migrations`,T=quoteTable(dialect,table),L=quoteTable(dialect,lockTableName(table)),bookkeepingTables=(table.includes(`.`)?table.slice(0,table.lastIndexOf(`.`)):schema)===schema?[table,lockTableName(table),pushTableName(table)].map(t=>t.slice(t.lastIndexOf(`.`)+1)):[],migrationDb;return{dialect,async ensureMigrationTables(){await pool.query(migrationsTableDdl(dialect,table)),await pool.query(lockTableDdl(dialect,table))},async listApplied(){return(await pool.query(`SELECT id, name, hash, batch, applied_at, direction
12
12
  FROM ${T}
13
13
  ORDER BY applied_at ASC, id ASC`)).rows.map(row=>({id:row.id,name:row.name,hash:row.hash,batch:Number(row.batch),appliedAt:row.applied_at instanceof Date?row.applied_at.toISOString():String(row.applied_at),direction:row.direction}))},async recordApplied(row){await pool.query(`INSERT INTO ${T} (id, name, hash, batch, direction)
14
14
  VALUES ($1, $2, $3, $4, $5)`,[row.id,row.name,row.hash,row.batch,row.direction])},async removeApplied(id){await pool.query(`DELETE FROM ${T} WHERE id = $1`,[id])},async acquireLock(owner){return(await pool.query(`UPDATE ${L}
@@ -1,6 +1,6 @@
1
1
 
2
- import { a as GeneratedAlwaysBrand, l as NotNullBrand, o as GeneratedBrand, t as ColumnBuilder } from "./types-DtX5fIbn.mjs";
3
- import { n as TableDecl } from "./table-B_TVt7EC.mjs";
2
+ import { a as GeneratedAlwaysBrand, l as NotNullBrand, o as GeneratedBrand, t as ColumnBuilder } from "./types-CBoxFMRg.mjs";
3
+ import { n as TableDecl } from "./table-xb127l8S.mjs";
4
4
  //#region src/schema.d.ts
5
5
  type ColumnsOf<T> = T extends TableDecl<string, infer C, string | undefined> ? C : never;
6
6
  type ValueOf<C> = C extends ColumnBuilder<infer V> ? V : never;
@@ -92,4 +92,4 @@ declare function updateSchema<T extends TableDecl, const O extends keyof Columns
92
92
  }): TableSchema<Partial<Omit<InferInsert<T>, O>>>;
93
93
  //#endregion
94
94
  export { SchemaIssue as a, TableSchemaOptions as c, updateSchema as d, JsonSchemaOptions as i, insertSchema as l, InferInsert as n, SchemaLike as o, InferSelect as r, TableSchema as s, ColumnRule as t, selectSchema as u };
95
- //# sourceMappingURL=schema-BIPOM1xj.d.mts.map
95
+ //# sourceMappingURL=schema-Cl1eDPkD.d.mts.map