arkormx 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +8 -8
- package/dist/index.cjs +4681 -21
- package/dist/index.d.cts +21 -5
- package/dist/index.d.mts +21 -5
- package/dist/index.mjs +4592 -21
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -19,7 +19,8 @@ interface SchemaColumn {
|
|
|
19
19
|
nullable?: boolean;
|
|
20
20
|
unique?: boolean;
|
|
21
21
|
primary?: boolean;
|
|
22
|
-
|
|
22
|
+
autoIncrement?: boolean;
|
|
23
|
+
after?: string;
|
|
23
24
|
default?: unknown;
|
|
24
25
|
}
|
|
25
26
|
interface SchemaIndex {
|
|
@@ -2225,6 +2226,21 @@ declare class TableBuilder {
|
|
|
2225
2226
|
private readonly dropColumnNames;
|
|
2226
2227
|
private readonly indexes;
|
|
2227
2228
|
private latestColumnName;
|
|
2229
|
+
/**
|
|
2230
|
+
* Defines a primary key column in the table.
|
|
2231
|
+
*
|
|
2232
|
+
* @param columnNameOrOptions
|
|
2233
|
+
* @param options
|
|
2234
|
+
* @returns
|
|
2235
|
+
*/
|
|
2236
|
+
primary(columnNameOrOptions?: string | {
|
|
2237
|
+
columnName?: string;
|
|
2238
|
+
autoIncrement?: boolean;
|
|
2239
|
+
default?: unknown;
|
|
2240
|
+
}, options?: {
|
|
2241
|
+
autoIncrement?: boolean;
|
|
2242
|
+
default?: unknown;
|
|
2243
|
+
}): this;
|
|
2228
2244
|
/**
|
|
2229
2245
|
* Defines an auto-incrementing primary key column.
|
|
2230
2246
|
*
|
|
@@ -2232,7 +2248,7 @@ declare class TableBuilder {
|
|
|
2232
2248
|
* @default 'id'
|
|
2233
2249
|
* @returns The current TableBuilder instance for chaining.
|
|
2234
2250
|
*/
|
|
2235
|
-
id(name?: string): this;
|
|
2251
|
+
id(name?: string, type?: Exclude<SchemaColumnType, 'boolean' | 'timestamp' | 'date' | 'json'>): this;
|
|
2236
2252
|
/**
|
|
2237
2253
|
* Defines a UUID column in the table.
|
|
2238
2254
|
*
|
|
@@ -2355,13 +2371,13 @@ declare class TableBuilder {
|
|
|
2355
2371
|
*/
|
|
2356
2372
|
nullable(columnName?: string): this;
|
|
2357
2373
|
/**
|
|
2358
|
-
* Sets the column position to appear
|
|
2374
|
+
* Sets the column position to appear after another column when possible.
|
|
2359
2375
|
*
|
|
2360
|
-
* @param referenceColumn The column that the target column should be placed
|
|
2376
|
+
* @param referenceColumn The column that the target column should be placed after.
|
|
2361
2377
|
* @param columnName Optional explicit target column name. When omitted, applies to the latest defined column.
|
|
2362
2378
|
* @returns The current TableBuilder instance for chaining.
|
|
2363
2379
|
*/
|
|
2364
|
-
|
|
2380
|
+
after(referenceColumn: string, columnName?: string): this;
|
|
2365
2381
|
/**
|
|
2366
2382
|
* Maps the column to a custom database column name.
|
|
2367
2383
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -19,7 +19,8 @@ interface SchemaColumn {
|
|
|
19
19
|
nullable?: boolean;
|
|
20
20
|
unique?: boolean;
|
|
21
21
|
primary?: boolean;
|
|
22
|
-
|
|
22
|
+
autoIncrement?: boolean;
|
|
23
|
+
after?: string;
|
|
23
24
|
default?: unknown;
|
|
24
25
|
}
|
|
25
26
|
interface SchemaIndex {
|
|
@@ -2225,6 +2226,21 @@ declare class TableBuilder {
|
|
|
2225
2226
|
private readonly dropColumnNames;
|
|
2226
2227
|
private readonly indexes;
|
|
2227
2228
|
private latestColumnName;
|
|
2229
|
+
/**
|
|
2230
|
+
* Defines a primary key column in the table.
|
|
2231
|
+
*
|
|
2232
|
+
* @param columnNameOrOptions
|
|
2233
|
+
* @param options
|
|
2234
|
+
* @returns
|
|
2235
|
+
*/
|
|
2236
|
+
primary(columnNameOrOptions?: string | {
|
|
2237
|
+
columnName?: string;
|
|
2238
|
+
autoIncrement?: boolean;
|
|
2239
|
+
default?: unknown;
|
|
2240
|
+
}, options?: {
|
|
2241
|
+
autoIncrement?: boolean;
|
|
2242
|
+
default?: unknown;
|
|
2243
|
+
}): this;
|
|
2228
2244
|
/**
|
|
2229
2245
|
* Defines an auto-incrementing primary key column.
|
|
2230
2246
|
*
|
|
@@ -2232,7 +2248,7 @@ declare class TableBuilder {
|
|
|
2232
2248
|
* @default 'id'
|
|
2233
2249
|
* @returns The current TableBuilder instance for chaining.
|
|
2234
2250
|
*/
|
|
2235
|
-
id(name?: string): this;
|
|
2251
|
+
id(name?: string, type?: Exclude<SchemaColumnType, 'boolean' | 'timestamp' | 'date' | 'json'>): this;
|
|
2236
2252
|
/**
|
|
2237
2253
|
* Defines a UUID column in the table.
|
|
2238
2254
|
*
|
|
@@ -2355,13 +2371,13 @@ declare class TableBuilder {
|
|
|
2355
2371
|
*/
|
|
2356
2372
|
nullable(columnName?: string): this;
|
|
2357
2373
|
/**
|
|
2358
|
-
* Sets the column position to appear
|
|
2374
|
+
* Sets the column position to appear after another column when possible.
|
|
2359
2375
|
*
|
|
2360
|
-
* @param referenceColumn The column that the target column should be placed
|
|
2376
|
+
* @param referenceColumn The column that the target column should be placed after.
|
|
2361
2377
|
* @param columnName Optional explicit target column name. When omitted, applies to the latest defined column.
|
|
2362
2378
|
* @returns The current TableBuilder instance for chaining.
|
|
2363
2379
|
*/
|
|
2364
|
-
|
|
2380
|
+
after(referenceColumn: string, columnName?: string): this;
|
|
2365
2381
|
/**
|
|
2366
2382
|
* Maps the column to a custom database column name.
|
|
2367
2383
|
*
|