drizzle-seed 0.4.0-dd6ee88 → 0.4.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 (53) 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 +3 -5
  5. package/cockroach-core/index.d.mts +3 -5
  6. package/cockroach-core/index.d.ts +3 -5
  7. package/common.d.cts +3 -5
  8. package/common.d.mts +3 -5
  9. package/common.d.ts +3 -5
  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 +147 -42
  14. package/generators/Generators.d.mts +147 -42
  15. package/generators/Generators.d.ts +147 -42
  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 +11 -4
  20. package/generators/versioning/v2.d.mts +11 -4
  21. package/generators/versioning/v2.d.ts +11 -4
  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 +764 -282
  26. package/index.cjs.map +1 -1
  27. package/index.d.cts +8 -20
  28. package/index.d.mts +8 -20
  29. package/index.d.ts +8 -20
  30. package/index.mjs +764 -282
  31. package/index.mjs.map +1 -1
  32. package/mysql-core/index.d.cts +3 -5
  33. package/mysql-core/index.d.mts +3 -5
  34. package/mysql-core/index.d.ts +3 -5
  35. package/package.json +3 -2
  36. package/pg-core/index.d.cts +3 -5
  37. package/pg-core/index.d.mts +3 -5
  38. package/pg-core/index.d.ts +3 -5
  39. package/singlestore-core/index.d.cts +3 -5
  40. package/singlestore-core/index.d.mts +3 -5
  41. package/singlestore-core/index.d.ts +3 -5
  42. package/sqlite-core/index.d.cts +3 -5
  43. package/sqlite-core/index.d.mts +3 -5
  44. package/sqlite-core/index.d.ts +3 -5
  45. package/types/seedService.d.cts +1 -1
  46. package/types/seedService.d.mts +1 -1
  47. package/types/seedService.d.ts +1 -1
  48. package/types/tables.d.cts +9 -6
  49. package/types/tables.d.mts +9 -6
  50. package/types/tables.d.ts +9 -6
  51. package/utils.d.cts +0 -1
  52. package/utils.d.mts +0 -1
  53. 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?: {
@@ -2,7 +2,7 @@ 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 { Table, TableConfigT } from '../types/tables.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
6
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
7
7
  [key: string]: CockroachTable;
8
8
  }) => Promise<void>;
@@ -23,8 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
23
23
  seed?: number;
24
24
  version?: number;
25
25
  }, refinements?: RefinementsType) => Promise<void>;
26
- export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
27
  [key: string]: string;
28
- }, dbToTsColumnNamesMap: {
29
- [key: string]: string;
30
- }) => Table;
28
+ }) => Column[];
@@ -2,7 +2,7 @@ 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 { Table, TableConfigT } from '../types/tables.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
6
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
7
7
  [key: string]: CockroachTable;
8
8
  }) => Promise<void>;
@@ -23,8 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
23
23
  seed?: number;
24
24
  version?: number;
25
25
  }, refinements?: RefinementsType) => Promise<void>;
26
- export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
27
  [key: string]: string;
28
- }, dbToTsColumnNamesMap: {
29
- [key: string]: string;
30
- }) => Table;
28
+ }) => Column[];
@@ -2,7 +2,7 @@ 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 { Table, TableConfigT } from '../types/tables.js';
5
+ import type { Column, TableConfigT } from '../types/tables.js';
6
6
  export declare const resetCockroach: (db: CockroachDatabase<any, any>, cockroachTables: {
7
7
  [key: string]: CockroachTable;
8
8
  }) => Promise<void>;
@@ -23,8 +23,6 @@ export declare const seedCockroach: (db: CockroachDatabase<any, any>, schema: {
23
23
  seed?: number;
24
24
  version?: number;
25
25
  }, refinements?: RefinementsType) => Promise<void>;
26
- export declare const mapCockroachTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
26
+ export declare const mapCockroachColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
27
27
  [key: string]: string;
28
- }, dbToTsColumnNamesMap: {
29
- [key: string]: string;
30
- }) => Table;
28
+ }) => Column[];
package/common.d.cts CHANGED
@@ -1,14 +1,12 @@
1
1
  import { type Relations } from 'drizzle-orm/_relations';
2
- import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
3
  export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
4
  [key: string]: DrizzleTable | Relations;
5
5
  }, drizzleTables: {
6
6
  [key: string]: DrizzleTable;
7
- }, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
8
  [key: string]: string;
9
- }, dbToTsColumnNamesMap: {
10
- [key: string]: string;
11
- }) => Table) => {
9
+ }) => Column[]) => {
12
10
  tables: Table[];
13
11
  relations: {
14
12
  isCyclic: boolean;
package/common.d.mts CHANGED
@@ -1,14 +1,12 @@
1
1
  import { type Relations } from 'drizzle-orm/_relations';
2
- import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
3
  export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
4
  [key: string]: DrizzleTable | Relations;
5
5
  }, drizzleTables: {
6
6
  [key: string]: DrizzleTable;
7
- }, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
8
  [key: string]: string;
9
- }, dbToTsColumnNamesMap: {
10
- [key: string]: string;
11
- }) => Table) => {
9
+ }) => Column[]) => {
12
10
  tables: Table[];
13
11
  relations: {
14
12
  isCyclic: boolean;
package/common.d.ts CHANGED
@@ -1,14 +1,12 @@
1
1
  import { type Relations } from 'drizzle-orm/_relations';
2
- import type { DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
2
+ import type { Column, DrizzleTable, RelationWithReferences, Table, TableConfigT } from './types/tables.js';
3
3
  export declare const getSchemaInfo: (drizzleTablesAndRelations: {
4
4
  [key: string]: DrizzleTable | Relations;
5
5
  }, drizzleTables: {
6
6
  [key: string]: DrizzleTable;
7
- }, mapTable: (tableConfig: TableConfigT, dbToTsTableNamesMap: {
7
+ }, mapColumns: (tableConfig: TableConfigT, dbToTsColumnNamesMap: {
8
8
  [key: string]: string;
9
- }, dbToTsColumnNamesMap: {
10
- [key: string]: string;
11
- }) => Table) => {
9
+ }) => Column[]) => {
12
10
  tables: Table[];
13
11
  relations: {
14
12
  isCyclic: boolean;