drizzle-seed 0.4.0-08bb2d5 → 0.4.0-0ec754e

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 (56) hide show
  1. package/SeedService.d.cts +1 -0
  2. package/SeedService.d.mts +1 -0
  3. package/SeedService.d.ts +1 -0
  4. package/cockroach-core/index.d.cts +6 -2
  5. package/cockroach-core/index.d.mts +6 -2
  6. package/cockroach-core/index.d.ts +6 -2
  7. package/common.d.cts +23 -0
  8. package/common.d.mts +23 -0
  9. package/common.d.ts +23 -0
  10. package/generators/GeneratorFuncs.d.cts +888 -28
  11. package/generators/GeneratorFuncs.d.mts +888 -28
  12. package/generators/GeneratorFuncs.d.ts +888 -28
  13. package/generators/Generators.d.cts +149 -44
  14. package/generators/Generators.d.mts +149 -44
  15. package/generators/Generators.d.ts +149 -44
  16. package/generators/apiVersion.d.cts +1 -1
  17. package/generators/apiVersion.d.mts +1 -1
  18. package/generators/apiVersion.d.ts +1 -1
  19. package/generators/versioning/v2.d.cts +13 -6
  20. package/generators/versioning/v2.d.mts +13 -6
  21. package/generators/versioning/v2.d.ts +13 -6
  22. package/generators/versioning/v3.d.cts +10 -0
  23. package/generators/versioning/v3.d.mts +10 -0
  24. package/generators/versioning/v3.d.ts +10 -0
  25. package/index.cjs +1122 -1186
  26. package/index.cjs.map +1 -1
  27. package/index.d.cts +13 -99
  28. package/index.d.mts +13 -99
  29. package/index.d.ts +13 -99
  30. package/index.mjs +1127 -1191
  31. package/index.mjs.map +1 -1
  32. package/mssql-core/index.d.cts +2 -2
  33. package/mssql-core/index.d.mts +2 -2
  34. package/mssql-core/index.d.ts +2 -2
  35. package/mysql-core/index.d.cts +6 -2
  36. package/mysql-core/index.d.mts +6 -2
  37. package/mysql-core/index.d.ts +6 -2
  38. package/package.json +108 -107
  39. package/pg-core/index.d.cts +6 -2
  40. package/pg-core/index.d.mts +6 -2
  41. package/pg-core/index.d.ts +6 -2
  42. package/singlestore-core/index.d.cts +6 -2
  43. package/singlestore-core/index.d.mts +6 -2
  44. package/singlestore-core/index.d.ts +6 -2
  45. package/sqlite-core/index.d.cts +6 -2
  46. package/sqlite-core/index.d.mts +6 -2
  47. package/sqlite-core/index.d.ts +6 -2
  48. package/types/seedService.d.cts +2 -2
  49. package/types/seedService.d.mts +2 -2
  50. package/types/seedService.d.ts +2 -2
  51. package/types/tables.d.cts +18 -0
  52. package/types/tables.d.mts +18 -0
  53. package/types/tables.d.ts +18 -0
  54. package/utils.d.cts +0 -1
  55. package/utils.d.mts +0 -1
  56. package/utils.d.ts +0 -1
package/SeedService.d.cts CHANGED
@@ -10,6 +10,7 @@ export declare class SeedService {
10
10
  private sqliteMaxParametersNumber;
11
11
  private mssqlMaxParametersNumber;
12
12
  private version?;
13
+ private hashFromStringGenerator;
13
14
  generatePossibleGenerators: (connectionType: "postgresql" | "mysql" | "sqlite" | "mssql" | "cockroach" | "singlestore", tables: Table[], relations: (Relation & {
14
15
  isCyclic: boolean;
15
16
  })[], refinements?: RefinementsType, options?: {
package/SeedService.d.mts CHANGED
@@ -10,6 +10,7 @@ export declare class SeedService {
10
10
  private sqliteMaxParametersNumber;
11
11
  private mssqlMaxParametersNumber;
12
12
  private version?;
13
+ private hashFromStringGenerator;
13
14
  generatePossibleGenerators: (connectionType: "postgresql" | "mysql" | "sqlite" | "mssql" | "cockroach" | "singlestore", tables: Table[], relations: (Relation & {
14
15
  isCyclic: boolean;
15
16
  })[], refinements?: RefinementsType, options?: {
package/SeedService.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare class SeedService {
10
10
  private sqliteMaxParametersNumber;
11
11
  private mssqlMaxParametersNumber;
12
12
  private version?;
13
+ private hashFromStringGenerator;
13
14
  generatePossibleGenerators: (connectionType: "postgresql" | "mysql" | "sqlite" | "mssql" | "cockroach" | "singlestore", tables: Table[], relations: (Relation & {
14
15
  isCyclic: boolean;
15
16
  })[], refinements?: RefinementsType, options?: {
@@ -1,7 +1,8 @@
1
- import { Relations } from 'drizzle-orm';
1
+ import { Relations } from 'drizzle-orm/_relations';
2
2
  import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
3
3
  import { CockroachTable } from 'drizzle-orm/cockroach-core';
4
4
  import type { RefinementsType } from '../types/seedService.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
5
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
6
7
  [key: string]: CockroachTable;
7
8
  }) => Promise<void>;
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
9
10
  [key: string]: CockroachTable | CockroachSchema | Relations | any;
10
11
  }) => {
11
12
  cockroachSchema: {
12
- [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
13
+ [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
13
14
  };
14
15
  cockroachTables: {
15
16
  [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
@@ -22,3 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
22
23
  seed?: number;
23
24
  version?: number;
24
25
  }, refinements?: RefinementsType) => Promise<void>;
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
+ [key: string]: string;
28
+ }) => Column[];
@@ -1,7 +1,8 @@
1
- import { Relations } from 'drizzle-orm';
1
+ import { Relations } from 'drizzle-orm/_relations';
2
2
  import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
3
3
  import { CockroachTable } from 'drizzle-orm/cockroach-core';
4
4
  import type { RefinementsType } from '../types/seedService.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
5
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
6
7
  [key: string]: CockroachTable;
7
8
  }) => Promise<void>;
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
9
10
  [key: string]: CockroachTable | CockroachSchema | Relations | any;
10
11
  }) => {
11
12
  cockroachSchema: {
12
- [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
13
+ [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
13
14
  };
14
15
  cockroachTables: {
15
16
  [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
@@ -22,3 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
22
23
  seed?: number;
23
24
  version?: number;
24
25
  }, refinements?: RefinementsType) => Promise<void>;
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
+ [key: string]: string;
28
+ }) => Column[];
@@ -1,7 +1,8 @@
1
- import { Relations } from 'drizzle-orm';
1
+ import { Relations } from 'drizzle-orm/_relations';
2
2
  import type { CockroachDatabase, CockroachSchema } from 'drizzle-orm/cockroach-core';
3
3
  import { CockroachTable } from 'drizzle-orm/cockroach-core';
4
4
  import type { RefinementsType } from '../types/seedService.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
5
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
6
7
  [key: string]: CockroachTable;
7
8
  }) => Promise<void>;
@@ -9,7 +10,7 @@ export declare const filterCockroachSchema: (schema: {
9
10
  [key: string]: CockroachTable | CockroachSchema | Relations | any;
10
11
  }) => {
11
12
  cockroachSchema: {
12
- [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm").Relation<string>>>;
13
+ [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig> | Relations<string, Record<string, import("drizzle-orm/_relations").Relation<string>>>;
13
14
  };
14
15
  cockroachTables: {
15
16
  [k: string]: CockroachTable<import("drizzle-orm/cockroach-core").TableConfig>;
@@ -22,3 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
22
23
  seed?: number;
23
24
  version?: number;
24
25
  }, refinements?: RefinementsType) => Promise<void>;
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
+ [key: string]: string;
28
+ }) => Column[];
package/common.d.cts ADDED
@@ -0,0 +1,23 @@
1
+ import { type Relations } from 'drizzle-orm/_relations';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
+ export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
+ [key: string]: DrizzleTable | Relations;
5
+ }, drizzleTables: {
6
+ [key: string]: DrizzleTable;
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
+ [key: string]: string;
9
+ }) => Column[]) => {
10
+ tables: Table[];
11
+ relations: {
12
+ isCyclic: boolean;
13
+ type?: "one" | "many";
14
+ table: string;
15
+ columns: string[];
16
+ refTable: string;
17
+ refColumns: string[];
18
+ refTableRels: RelationWithReferences[];
19
+ }[];
20
+ tableRelations: {
21
+ [tableName: string]: RelationWithReferences[];
22
+ };
23
+ };
package/common.d.mts ADDED
@@ -0,0 +1,23 @@
1
+ import { type Relations } from 'drizzle-orm/_relations';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
+ export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
+ [key: string]: DrizzleTable | Relations;
5
+ }, drizzleTables: {
6
+ [key: string]: DrizzleTable;
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
+ [key: string]: string;
9
+ }) => Column[]) => {
10
+ tables: Table[];
11
+ relations: {
12
+ isCyclic: boolean;
13
+ type?: "one" | "many";
14
+ table: string;
15
+ columns: string[];
16
+ refTable: string;
17
+ refColumns: string[];
18
+ refTableRels: RelationWithReferences[];
19
+ }[];
20
+ tableRelations: {
21
+ [tableName: string]: RelationWithReferences[];
22
+ };
23
+ };
package/common.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import { type Relations } from 'drizzle-orm/_relations';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
+ export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
+ [key: string]: DrizzleTable | Relations;
5
+ }, drizzleTables: {
6
+ [key: string]: DrizzleTable;
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
+ [key: string]: string;
9
+ }) => Column[]) => {
10
+ tables: Table[];
11
+ relations: {
12
+ isCyclic: boolean;
13
+ type?: "one" | "many";
14
+ table: string;
15
+ columns: string[];
16
+ refTable: string;
17
+ refColumns: string[];
18
+ refTableRels: RelationWithReferences[];
19
+ }[];
20
+ tableRelations: {
21
+ [tableName: string]: RelationWithReferences[];
22
+ };
23
+ };