drizzle-seed 0.3.2-f8a2f3c → 0.4.0-08e4e66
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/{services/SeedService.d.cts → SeedService.d.cts} +18 -26
- package/{services/SeedService.d.mts → SeedService.d.mts} +18 -26
- package/{services/SeedService.d.ts → SeedService.d.ts} +18 -26
- package/cockroach-core/index.d.cts +28 -0
- package/cockroach-core/index.d.mts +28 -0
- package/cockroach-core/index.d.ts +28 -0
- package/cockroach-core/selectGensForColumn.d.cts +3 -0
- package/cockroach-core/selectGensForColumn.d.mts +3 -0
- package/cockroach-core/selectGensForColumn.d.ts +3 -0
- package/common.d.cts +23 -0
- package/common.d.mts +23 -0
- package/common.d.ts +23 -0
- package/{services → generators}/GeneratorFuncs.d.cts +312 -59
- package/{services → generators}/GeneratorFuncs.d.mts +312 -59
- package/{services → generators}/GeneratorFuncs.d.ts +312 -59
- package/{services → generators}/Generators.d.cts +277 -54
- package/{services → generators}/Generators.d.mts +277 -54
- package/{services → generators}/Generators.d.ts +277 -54
- package/generators/utils.d.cts +38 -0
- package/generators/utils.d.mts +38 -0
- package/generators/utils.d.ts +38 -0
- package/{services → generators}/versioning/v2.d.cts +13 -6
- package/{services → generators}/versioning/v2.d.mts +13 -6
- package/{services → generators}/versioning/v2.d.ts +13 -6
- package/index.cjs +3156 -1472
- package/index.cjs.map +1 -1
- package/index.d.cts +92 -123
- package/index.d.mts +92 -123
- package/index.d.ts +92 -123
- package/index.mjs +3161 -1476
- package/index.mjs.map +1 -1
- package/mssql-core/index.d.cts +24 -0
- package/mssql-core/index.d.mts +24 -0
- package/mssql-core/index.d.ts +24 -0
- package/mssql-core/selectGensForColumn.d.cts +2 -0
- package/mssql-core/selectGensForColumn.d.mts +2 -0
- package/mssql-core/selectGensForColumn.d.ts +2 -0
- package/mysql-core/index.d.cts +28 -0
- package/mysql-core/index.d.mts +28 -0
- package/mysql-core/index.d.ts +28 -0
- package/mysql-core/selectGensForColumn.d.cts +2 -0
- package/mysql-core/selectGensForColumn.d.mts +2 -0
- package/mysql-core/selectGensForColumn.d.ts +2 -0
- package/package.json +13 -9
- package/pg-core/index.d.cts +28 -0
- package/pg-core/index.d.mts +28 -0
- package/pg-core/index.d.ts +28 -0
- package/pg-core/selectGensForColumn.d.cts +3 -0
- package/pg-core/selectGensForColumn.d.mts +3 -0
- package/pg-core/selectGensForColumn.d.ts +3 -0
- package/singlestore-core/index.d.cts +28 -0
- package/singlestore-core/index.d.mts +28 -0
- package/singlestore-core/index.d.ts +28 -0
- package/singlestore-core/selectGensForColumn.d.cts +2 -0
- package/singlestore-core/selectGensForColumn.d.mts +2 -0
- package/singlestore-core/selectGensForColumn.d.ts +2 -0
- package/sqlite-core/index.d.cts +28 -0
- package/sqlite-core/index.d.mts +28 -0
- package/sqlite-core/index.d.ts +28 -0
- package/sqlite-core/selectGensForColumn.d.cts +2 -0
- package/sqlite-core/selectGensForColumn.d.mts +2 -0
- package/sqlite-core/selectGensForColumn.d.ts +2 -0
- package/types/seedService.d.cts +12 -2
- package/types/seedService.d.mts +12 -2
- package/types/seedService.d.ts +12 -2
- package/types/tables.d.cts +20 -0
- package/types/tables.d.mts +20 -0
- package/types/tables.d.ts +20 -0
- package/utils.d.cts +4 -0
- package/utils.d.mts +4 -0
- package/utils.d.ts +4 -0
- package/services/utils.d.cts +0 -23
- package/services/utils.d.mts +0 -23
- package/services/utils.d.ts +0 -23
- /package/{services → generators}/apiVersion.d.cts +0 -0
- /package/{services → generators}/apiVersion.d.mts +0 -0
- /package/{services → generators}/apiVersion.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
|
+
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
export declare const resetMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
6
|
+
[key: string]: MsSqlTable;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare const filterMsSqlTables: (schema: {
|
|
9
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
|
+
}) => {
|
|
11
|
+
mssqlSchema: {
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
|
+
};
|
|
14
|
+
mssqlTables: {
|
|
15
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const seedMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
19
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
20
|
+
}, options?: {
|
|
21
|
+
count?: number;
|
|
22
|
+
seed?: number;
|
|
23
|
+
version?: number;
|
|
24
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
|
+
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
export declare const resetMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
6
|
+
[key: string]: MsSqlTable;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare const filterMsSqlTables: (schema: {
|
|
9
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
|
+
}) => {
|
|
11
|
+
mssqlSchema: {
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
|
+
};
|
|
14
|
+
mssqlTables: {
|
|
15
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const seedMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
19
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
20
|
+
}, options?: {
|
|
21
|
+
count?: number;
|
|
22
|
+
seed?: number;
|
|
23
|
+
version?: number;
|
|
24
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MsSqlDatabase, MsSqlSchema } from 'drizzle-orm/mssql-core';
|
|
3
|
+
import { MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
export declare const resetMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
6
|
+
[key: string]: MsSqlTable;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare const filterMsSqlTables: (schema: {
|
|
9
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
10
|
+
}) => {
|
|
11
|
+
mssqlSchema: {
|
|
12
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
13
|
+
};
|
|
14
|
+
mssqlTables: {
|
|
15
|
+
[k: string]: MsSqlTable<import("drizzle-orm/mssql-core").TableConfig>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const seedMsSql: (db: MsSqlDatabase<any, any>, schema: {
|
|
19
|
+
[key: string]: MsSqlTable | MsSqlSchema | Relations | any;
|
|
20
|
+
}, options?: {
|
|
21
|
+
count?: number;
|
|
22
|
+
seed?: number;
|
|
23
|
+
version?: number;
|
|
24
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMssqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMssqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMssqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
|
+
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: MySqlTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterMysqlTables: (schema: {
|
|
10
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
mysqlSchema: {
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
mysqlTables: {
|
|
16
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
|
+
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: MySqlTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterMysqlTables: (schema: {
|
|
10
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
mysqlSchema: {
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
mysqlTables: {
|
|
16
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { MySqlDatabase, MySqlSchema } from 'drizzle-orm/mysql-core';
|
|
3
|
+
import { MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: MySqlTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterMysqlTables: (schema: {
|
|
10
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
mysqlSchema: {
|
|
13
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
mysqlTables: {
|
|
16
|
+
[k: string]: MySqlTable<import("drizzle-orm/mysql-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedMySql: (db: MySqlDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: MySqlTable | MySqlSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapMySqlColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMysqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMysqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForMysqlColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-seed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-08e4e66",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsx scripts/build.ts",
|
|
7
|
+
"build": "tsc -p ./tsconfig.json && tsx scripts/build.ts",
|
|
8
8
|
"pack": "(cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
|
|
9
9
|
"test": "vitest --config ./vitest.config.ts",
|
|
10
|
-
"test:types": "cd type-tests && tsc",
|
|
10
|
+
"test:types": "cd type-tests && tsc -p ./../tsconfig.json",
|
|
11
11
|
"generate-for-tests:pg": "drizzle-kit generate --config=./src/tests/pg/drizzle.config.ts",
|
|
12
12
|
"generate-for-tests:mysql": "drizzle-kit generate --config=./src/tests/mysql/drizzle.config.ts",
|
|
13
13
|
"generate-for-tests:sqlite": "drizzle-kit generate --config=./src/tests/sqlite/drizzle.config.ts",
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"drizzle-orm": ">=0.
|
|
68
|
+
"drizzle-orm": ">=1.0.0-beta.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"drizzle-orm": {
|
|
72
|
-
"optional":
|
|
72
|
+
"optional": false
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
@@ -77,26 +77,30 @@
|
|
|
77
77
|
"@electric-sql/pglite": "^0.2.12",
|
|
78
78
|
"@rollup/plugin-terser": "^0.4.4",
|
|
79
79
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
80
|
+
"@types/async-retry": "^1.4.8",
|
|
80
81
|
"@types/better-sqlite3": "^7.6.11",
|
|
81
82
|
"@types/dockerode": "^3.3.31",
|
|
83
|
+
"@types/mssql": "^9.1.4",
|
|
82
84
|
"@types/node": "^22.5.4",
|
|
83
85
|
"@types/pg": "^8.11.6",
|
|
84
86
|
"@types/uuid": "^10.0.0",
|
|
87
|
+
"async-retry": "^1.3.3",
|
|
85
88
|
"better-sqlite3": "^11.1.2",
|
|
86
89
|
"cpy": "^11.1.0",
|
|
87
|
-
"dockerode": "^4.0.
|
|
90
|
+
"dockerode": "^4.0.6",
|
|
88
91
|
"dotenv": "^16.4.5",
|
|
89
92
|
"drizzle-kit": "workspace:./drizzle-kit/dist",
|
|
90
93
|
"drizzle-orm": "workspace:./drizzle-orm/dist",
|
|
91
94
|
"get-port": "^7.1.0",
|
|
92
|
-
"
|
|
95
|
+
"mssql": "^11.0.1",
|
|
96
|
+
"mysql2": "^3.14.1",
|
|
93
97
|
"pg": "^8.12.0",
|
|
94
98
|
"resolve-tspaths": "^0.8.19",
|
|
95
|
-
"rollup": "^
|
|
99
|
+
"rollup": "^3.29.5",
|
|
96
100
|
"tslib": "^2.7.0",
|
|
97
101
|
"tsx": "^4.19.0",
|
|
98
102
|
"uuid": "^10.0.0",
|
|
99
|
-
"vitest": "^
|
|
103
|
+
"vitest": "^3.1.3",
|
|
100
104
|
"zx": "^8.1.5"
|
|
101
105
|
},
|
|
102
106
|
"dependencies": {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
|
+
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
7
|
+
[key: string]: PgTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterPgSchema: (schema: {
|
|
10
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
pgSchema: {
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
pgTables: {
|
|
16
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
|
+
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
7
|
+
[key: string]: PgTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterPgSchema: (schema: {
|
|
10
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
pgSchema: {
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
pgTables: {
|
|
16
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { PgDatabase, PgSchema } from 'drizzle-orm/pg-core';
|
|
3
|
+
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetPostgres: (db: PgDatabase<any, any>, pgTables: {
|
|
7
|
+
[key: string]: PgTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterPgSchema: (schema: {
|
|
10
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
pgSchema: {
|
|
13
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
pgTables: {
|
|
16
|
+
[k: string]: PgTable<import("drizzle-orm/pg-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedPostgres: (db: PgDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: PgTable | PgSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapPgColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GenerateInterval } from '../generators/Generators.js';
|
|
2
|
+
import type { Column, Table } from '../types/tables.js';
|
|
3
|
+
export declare const selectGeneratorForPostgresColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateArray | import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | GenerateInterval | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateUUID | import("../generators/Generators.js").GeneratePoint | import("../generators/Generators.js").GenerateLine | import("../generators/Generators.js").GenerateBitString | import("../generators/Generators.js").GenerateInet | import("../generators/Generators.js").GenerateGeometry | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GenerateInterval } from '../generators/Generators.js';
|
|
2
|
+
import type { Column, Table } from '../types/tables.js';
|
|
3
|
+
export declare const selectGeneratorForPostgresColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateArray | import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | GenerateInterval | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateUUID | import("../generators/Generators.js").GeneratePoint | import("../generators/Generators.js").GenerateLine | import("../generators/Generators.js").GenerateBitString | import("../generators/Generators.js").GenerateInet | import("../generators/Generators.js").GenerateGeometry | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GenerateInterval } from '../generators/Generators.js';
|
|
2
|
+
import type { Column, Table } from '../types/tables.js';
|
|
3
|
+
export declare const selectGeneratorForPostgresColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateArray | import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | GenerateInterval | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateUUID | import("../generators/Generators.js").GeneratePoint | import("../generators/Generators.js").GenerateLine | import("../generators/Generators.js").GenerateBitString | import("../generators/Generators.js").GenerateInet | import("../generators/Generators.js").GenerateGeometry | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
|
+
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SingleStoreTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSingleStoreTables: (schema: {
|
|
10
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
singleStoreSchema: {
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
singleStoreTables: {
|
|
16
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
|
+
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SingleStoreTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSingleStoreTables: (schema: {
|
|
10
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
singleStoreSchema: {
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
singleStoreTables: {
|
|
16
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { SingleStoreDatabase, SingleStoreSchema } from 'drizzle-orm/singlestore-core';
|
|
3
|
+
import { SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SingleStoreTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSingleStoreTables: (schema: {
|
|
10
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
singleStoreSchema: {
|
|
13
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
singleStoreTables: {
|
|
16
|
+
[k: string]: SingleStoreTable<import("drizzle-orm/singlestore-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSingleStore: (db: SingleStoreDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SingleStoreTable | SingleStoreSchema | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSingleStoreColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSingleStoreColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSingleStoreColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSingleStoreColumn: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateDate | import("../generators/Generators.js").GenerateTime | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateDatetime | import("../generators/Generators.js").GenerateYear | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateEnum | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | import("../generators/Generators.js").GenerateVector | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
|
+
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SQLiteTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSqliteTables: (schema: {
|
|
10
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
sqliteSchema: {
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
sqliteTables: {
|
|
16
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
|
+
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SQLiteTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSqliteTables: (schema: {
|
|
10
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
sqliteSchema: {
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
sqliteTables: {
|
|
16
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Relations } from 'drizzle-orm/_relations';
|
|
2
|
+
import type { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
|
+
import { SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
4
|
+
import type { RefinementsType } from '../types/seedService.js';
|
|
5
|
+
import type { Column, TableConfigT } from '../types/tables.js';
|
|
6
|
+
export declare const resetSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
7
|
+
[key: string]: SQLiteTable;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export declare const filterSqliteTables: (schema: {
|
|
10
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
11
|
+
}) => {
|
|
12
|
+
sqliteSchema: {
|
|
13
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
|
|
14
|
+
};
|
|
15
|
+
sqliteTables: {
|
|
16
|
+
[k: string]: SQLiteTable<import("drizzle-orm/sqlite-core").TableConfig>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const seedSqlite: (db: BaseSQLiteDatabase<any, any>, schema: {
|
|
20
|
+
[key: string]: SQLiteTable | Relations | any;
|
|
21
|
+
}, options?: {
|
|
22
|
+
count?: number;
|
|
23
|
+
seed?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
}, refinements?: RefinementsType) => Promise<void>;
|
|
26
|
+
export declare const mapSqliteColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}) => Column[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSqlite: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSqlite: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { Column, Table } from '../types/tables.js';
|
|
2
|
+
export declare const selectGeneratorForSqlite: (table: Table, col: Column) => import("../generators/Generators.js").GenerateDefault | import("../generators/Generators.js").GenerateIntPrimaryKey | import("../generators/Generators.js").GenerateNumber | import("../generators/Generators.js").GenerateInt | import("../generators/Generators.js").GenerateBoolean | import("../generators/Generators.js").GenerateTimestamp | import("../generators/Generators.js").GenerateJson | import("../generators/Generators.js").GenerateEmail | import("../generators/Generators.js").GenerateFirstName | import("../generators/Generators.js").GenerateString | import("../generators/Generators.js").GenerateUniqueString | undefined;
|
package/types/seedService.d.cts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CockroachDatabase, CockroachTable } from 'drizzle-orm/cockroach-core';
|
|
2
|
+
import type { MsSqlDatabase, MsSqlTable } from 'drizzle-orm/mssql-core';
|
|
3
|
+
import type { MySqlDatabase, MySqlTable } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import type { PgDatabase, PgTable } from 'drizzle-orm/pg-core';
|
|
5
|
+
import type { SingleStoreDatabase, SingleStoreTable } from 'drizzle-orm/singlestore-core';
|
|
6
|
+
import type { BaseSQLiteDatabase, SQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
7
|
+
import type { AbstractGenerator } from '../generators/Generators.js';
|
|
2
8
|
import type { Prettify } from './tables.js';
|
|
9
|
+
export type GeneratedValueType = number | bigint | string | Buffer | boolean | undefined;
|
|
10
|
+
export type DbType = PgDatabase<any, any, any> | MySqlDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MsSqlDatabase<any, any, any, any> | CockroachDatabase<any, any, any> | SingleStoreDatabase<any, any, any, any>;
|
|
11
|
+
export type TableType = PgTable | MySqlTable | SQLiteTable | MsSqlTable | CockroachTable | SingleStoreTable;
|
|
3
12
|
export type TableGeneratorsType = {
|
|
4
13
|
[columnName: string]: Prettify<{
|
|
5
14
|
hasSelfRelation?: boolean | undefined;
|
|
@@ -14,6 +23,7 @@ export type GeneratePossibleGeneratorsColumnType = {
|
|
|
14
23
|
notNull: boolean;
|
|
15
24
|
primary: boolean;
|
|
16
25
|
generatedIdentityType?: 'always' | 'byDefault' | undefined;
|
|
26
|
+
identity?: boolean;
|
|
17
27
|
wasRefined: boolean;
|
|
18
28
|
wasDefinedBefore: boolean;
|
|
19
29
|
isCyclic: boolean;
|
|
@@ -37,7 +47,7 @@ export type RefinementsType = Prettify<{
|
|
|
37
47
|
[tableName: string]: {
|
|
38
48
|
count?: number;
|
|
39
49
|
columns: {
|
|
40
|
-
[columnName: string]: AbstractGenerator<{}
|
|
50
|
+
[columnName: string]: AbstractGenerator<{}>;
|
|
41
51
|
};
|
|
42
52
|
with?: {
|
|
43
53
|
[tableName: string]: number | {
|