@simplysm/orm-common 13.0.82 → 13.0.84

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 (80) hide show
  1. package/README.md +106 -0
  2. package/dist/ddl/initialize.d.ts +2 -2
  3. package/dist/ddl/initialize.js +1 -1
  4. package/dist/ddl/initialize.js.map +1 -1
  5. package/dist/ddl/table-ddl.d.ts +1 -1
  6. package/dist/exec/queryable.d.ts +115 -115
  7. package/dist/exec/queryable.js +68 -68
  8. package/dist/exec/queryable.js.map +1 -1
  9. package/dist/expr/expr.d.ts +248 -248
  10. package/dist/expr/expr.js +250 -250
  11. package/dist/query-builder/base/expr-renderer-base.d.ts +7 -7
  12. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts +3 -3
  13. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts.map +1 -1
  14. package/dist/query-builder/mssql/mssql-expr-renderer.js +5 -5
  15. package/dist/query-builder/mssql/mssql-query-builder.d.ts +2 -2
  16. package/dist/query-builder/mssql/mssql-query-builder.d.ts.map +1 -1
  17. package/dist/query-builder/mssql/mssql-query-builder.js +7 -7
  18. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts +2 -2
  19. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts.map +1 -1
  20. package/dist/query-builder/mysql/mysql-expr-renderer.js +4 -4
  21. package/dist/query-builder/mysql/mysql-query-builder.d.ts +10 -10
  22. package/dist/query-builder/mysql/mysql-query-builder.d.ts.map +1 -1
  23. package/dist/query-builder/mysql/mysql-query-builder.js +4 -4
  24. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts +2 -2
  25. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts.map +1 -1
  26. package/dist/query-builder/postgresql/postgresql-expr-renderer.js +4 -4
  27. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts +8 -8
  28. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts.map +1 -1
  29. package/dist/query-builder/postgresql/postgresql-query-builder.js +7 -7
  30. package/dist/query-builder/query-builder.d.ts +1 -1
  31. package/dist/schema/factory/column-builder.d.ts +46 -46
  32. package/dist/schema/factory/column-builder.js +25 -25
  33. package/dist/schema/factory/index-builder.d.ts +22 -22
  34. package/dist/schema/factory/index-builder.js +14 -14
  35. package/dist/schema/factory/relation-builder.d.ts +93 -93
  36. package/dist/schema/factory/relation-builder.d.ts.map +1 -1
  37. package/dist/schema/factory/relation-builder.js +37 -37
  38. package/dist/schema/procedure-builder.d.ts +38 -38
  39. package/dist/schema/procedure-builder.d.ts.map +1 -1
  40. package/dist/schema/procedure-builder.js +26 -26
  41. package/dist/schema/table-builder.d.ts +38 -38
  42. package/dist/schema/table-builder.d.ts.map +1 -1
  43. package/dist/schema/table-builder.js +29 -29
  44. package/dist/schema/view-builder.d.ts +26 -26
  45. package/dist/schema/view-builder.d.ts.map +1 -1
  46. package/dist/schema/view-builder.js +18 -18
  47. package/dist/types/db.d.ts +40 -40
  48. package/dist/types/expr.d.ts +75 -75
  49. package/dist/types/expr.d.ts.map +1 -1
  50. package/dist/types/query-def.d.ts +32 -32
  51. package/dist/types/query-def.d.ts.map +1 -1
  52. package/docs/db-context.md +238 -0
  53. package/docs/expressions.md +413 -0
  54. package/docs/query-builder.md +198 -0
  55. package/docs/queryable.md +420 -0
  56. package/docs/schema-builders.md +216 -0
  57. package/docs/types-and-utilities.md +353 -0
  58. package/package.json +4 -3
  59. package/src/ddl/initialize.ts +16 -16
  60. package/src/ddl/table-ddl.ts +1 -1
  61. package/src/exec/queryable.ts +163 -163
  62. package/src/expr/expr.ts +257 -257
  63. package/src/query-builder/base/expr-renderer-base.ts +8 -8
  64. package/src/query-builder/mssql/mssql-expr-renderer.ts +20 -20
  65. package/src/query-builder/mssql/mssql-query-builder.ts +28 -28
  66. package/src/query-builder/mysql/mysql-expr-renderer.ts +22 -22
  67. package/src/query-builder/mysql/mysql-query-builder.ts +65 -65
  68. package/src/query-builder/postgresql/postgresql-expr-renderer.ts +15 -15
  69. package/src/query-builder/postgresql/postgresql-query-builder.ts +43 -43
  70. package/src/query-builder/query-builder.ts +1 -1
  71. package/src/schema/factory/column-builder.ts +48 -48
  72. package/src/schema/factory/index-builder.ts +22 -22
  73. package/src/schema/factory/relation-builder.ts +95 -95
  74. package/src/schema/procedure-builder.ts +38 -38
  75. package/src/schema/table-builder.ts +38 -38
  76. package/src/schema/view-builder.ts +28 -28
  77. package/src/types/db.ts +41 -41
  78. package/src/types/expr.ts +79 -79
  79. package/src/types/query-def.ts +37 -37
  80. package/tests/ddl/basic.expected.ts +8 -8
@@ -1,12 +1,12 @@
1
1
  import { type ColumnBuilderRecord, createColumnFactory } from "./factory/column-builder";
2
2
  /**
3
- * 저장 Procedure definition builder
3
+ * Stored Procedure definition builder
4
4
  *
5
- * Fluent API를 통해 Procedure 파라미터, return type, 본문을 definition
6
- * DbContext executable() 함께 사용하여 type 안전한 Procedure 호출
5
+ * Define Procedure parameters, return type, and body via Fluent API
6
+ * Use with DbContext's executable() for type-safe Procedure invocation
7
7
  *
8
- * @template TParams - 파라미터 Column definition type
9
- * @template TReturns - return Column definition type
8
+ * @template TParams - Parameter Column definition type
9
+ * @template TReturns - Return Column definition type
10
10
  *
11
11
  * @example
12
12
  * ```typescript
@@ -23,12 +23,12 @@ import { type ColumnBuilderRecord, createColumnFactory } from "./factory/column-
23
23
  * }))
24
24
  * .body("SELECT id, name, email FROM User WHERE id = userId");
25
25
  *
26
- * // DbContextused in
26
+ * // Used in DbContext
27
27
  * class MyDb extends DbContext {
28
28
  * readonly getUserById = executable(this, GetUserById);
29
29
  * }
30
30
  *
31
- * // 호출
31
+ * // Invocation
32
32
  * const users = await db.getUserById({ userId: 1n }).execute();
33
33
  * ```
34
34
  *
@@ -45,19 +45,19 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
45
45
  returns?: TReturns;
46
46
  query?: string;
47
47
  };
48
- /** 파라미터 definition (type for inference) */
48
+ /** Parameter definition (type for inference) */
49
49
  readonly $params: TParams;
50
50
  /** return type definition (type for inference) */
51
51
  readonly $returns: TReturns;
52
52
  /**
53
53
  * @param meta - Procedure Metadata
54
- * @param meta.name - Procedure 이름
55
- * @param meta.description - Procedure description (주석)
56
- * @param meta.database - Database 이름
57
- * @param meta.schema - Schema 이름 (MSSQL/PostgreSQL)
58
- * @param meta.params - 파라미터 definition
59
- * @param meta.returns - return type definition
60
- * @param meta.query - Procedure 본문 SQL
54
+ * @param meta.name - Procedure name
55
+ * @param meta.description - Procedure description (comment)
56
+ * @param meta.database - Database name
57
+ * @param meta.schema - Schema name (MSSQL/PostgreSQL)
58
+ * @param meta.params - Parameter definition
59
+ * @param meta.returns - Return type definition
60
+ * @param meta.query - Procedure body SQL
61
61
  */
62
62
  constructor(meta: {
63
63
  name: string;
@@ -71,14 +71,14 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
71
71
  /**
72
72
  * Procedure set description
73
73
  *
74
- * @param desc - Procedure description (DDL Comment으로 사용)
74
+ * @param desc - Procedure description (used as DDL Comment)
75
75
  * @returns new ProcedureBuilder instance
76
76
  */
77
77
  description(desc: string): ProcedureBuilder<TParams, TReturns>;
78
78
  /**
79
79
  * Database set name
80
80
  *
81
- * @param db - Database 이름
81
+ * @param db - Database name
82
82
  * @returns new ProcedureBuilder instance
83
83
  *
84
84
  * @example
@@ -92,18 +92,18 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
92
92
  *
93
93
  * MSSQL, PostgreSQLused in
94
94
  *
95
- * @param schema - Schema 이름 (MSSQL: dbo, PostgreSQL: public)
95
+ * @param schema - Schema name (MSSQL: dbo, PostgreSQL: public)
96
96
  * @returns new ProcedureBuilder instance
97
97
  */
98
98
  schema(schema: string): ProcedureBuilder<TParams, TReturns>;
99
99
  /**
100
- * 파라미터 definition
100
+ * Parameter definition
101
101
  *
102
- * Procedure 입력 파라미터 definition
103
- * DBMS 파라미터 문법 차이 주의 (MSSQL: @param, MySQL/PostgreSQL: param)
102
+ * Define Procedure input parameters
103
+ * Note DBMS-specific parameter syntax differences (MSSQL: @param, MySQL/PostgreSQL: param)
104
104
  *
105
- * @template T - 파라미터 definition type
106
- * @param fn - Column factory 받아 파라미터 정의를 반환하는 function
105
+ * @template T - New parameter definition type
106
+ * @param fn - Function that receives a Column factory and returns parameter definitions
107
107
  * @returns new ProcedureBuilder instance
108
108
  *
109
109
  * @example
@@ -117,12 +117,12 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
117
117
  */
118
118
  params<T extends ColumnBuilderRecord>(fn: (c: ReturnType<typeof createColumnFactory>) => T): ProcedureBuilder<T, TReturns>;
119
119
  /**
120
- * return type definition
120
+ * Return type definition
121
121
  *
122
- * Procedure return result Column definition
122
+ * Define Procedure return result columns
123
123
  *
124
- * @template T - return type definition
125
- * @param fn - Column factory 받아 return Column definition를 반환하는 function
124
+ * @template T - New return type definition
125
+ * @param fn - Function that receives a Column factory and returns Column definitions
126
126
  * @returns new ProcedureBuilder instance
127
127
  *
128
128
  * @example
@@ -138,14 +138,14 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
138
138
  */
139
139
  returns<T extends ColumnBuilderRecord>(fn: (c: ReturnType<typeof createColumnFactory>) => T): ProcedureBuilder<TParams, T>;
140
140
  /**
141
- * Procedure 본문 SQL 설정
141
+ * Set Procedure body SQL
142
142
  *
143
- * DBMS SQL 문법 차이 주의:
144
- * - MySQL: 파라미터명 그대로 (userId)
145
- * - MSSQL: @ 접두사 (@userId)
146
- * - PostgreSQL: RETURN QUERY 필요
143
+ * Note DBMS-specific SQL syntax differences:
144
+ * - MySQL: parameter name as-is (userId)
145
+ * - MSSQL: @ prefix (@userId)
146
+ * - PostgreSQL: RETURN QUERY required
147
147
  *
148
- * @param sql - Procedure 본문 SQL
148
+ * @param sql - Procedure body SQL
149
149
  * @returns new ProcedureBuilder instance
150
150
  *
151
151
  * @example
@@ -164,16 +164,16 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
164
164
  body(sql: string): ProcedureBuilder<TParams, TReturns>;
165
165
  }
166
166
  /**
167
- * Procedure builder Generate factory function
167
+ * Procedure builder factory function
168
168
  *
169
- * ProcedureBuilder 생성하여 Fluent API로 저장 Procedure schema definition
169
+ * Creates a ProcedureBuilder for defining stored Procedure schema via Fluent API
170
170
  *
171
- * @param name - Procedure 이름
171
+ * @param name - Procedure name
172
172
  * @returns ProcedureBuilder instance
173
173
  *
174
174
  * @example
175
175
  * ```typescript
176
- * // Basic 사용
176
+ * // Basic usage
177
177
  * const GetUserById = Procedure("GetUserById")
178
178
  * .database("mydb")
179
179
  * .params((c) => ({
@@ -186,7 +186,7 @@ export declare class ProcedureBuilder<TParams extends ColumnBuilderRecord, TRetu
186
186
  * }))
187
187
  * .body("SELECT id, name, email FROM User WHERE id = userId");
188
188
  *
189
- * // 파라미터 없는 Procedure
189
+ * // Procedure without parameters
190
190
  * const GetAllActiveUsers = Procedure("GetAllActiveUsers")
191
191
  * .database("mydb")
192
192
  * .returns((c) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"procedure-builder.d.ts","sourceRoot":"","sources":["..\\..\\src\\schema\\procedure-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAAa,gBAAgB,CAC3B,OAAO,SAAS,mBAAmB,EACnC,QAAQ,SAAS,mBAAmB;IAkBlC,QAAQ,CAAC,IAAI,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;QACnB,KAAK,CAAC,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AM,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;IAI9D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;IAIzD;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;IAI3D;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,CAAC,SAAS,mBAAmB,EAClC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,GACnD,gBAAgB,CAAC,CAAC,EAAE,QAAQ,CAAC;IAIhC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,CAAC,SAAS,mBAAmB,EACnC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,GACnD,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IAI/B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC;CAGvD;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAEtE"}
@@ -2,25 +2,25 @@ import { createColumnFactory } from "./factory/column-builder.js";
2
2
  class ProcedureBuilder {
3
3
  /**
4
4
  * @param meta - Procedure Metadata
5
- * @param meta.name - Procedure 이름
6
- * @param meta.description - Procedure description (주석)
7
- * @param meta.database - Database 이름
8
- * @param meta.schema - Schema 이름 (MSSQL/PostgreSQL)
9
- * @param meta.params - 파라미터 definition
10
- * @param meta.returns - return type definition
11
- * @param meta.query - Procedure 본문 SQL
5
+ * @param meta.name - Procedure name
6
+ * @param meta.description - Procedure description (comment)
7
+ * @param meta.database - Database name
8
+ * @param meta.schema - Schema name (MSSQL/PostgreSQL)
9
+ * @param meta.params - Parameter definition
10
+ * @param meta.returns - Return type definition
11
+ * @param meta.query - Procedure body SQL
12
12
  */
13
13
  constructor(meta) {
14
14
  this.meta = meta;
15
15
  }
16
- /** 파라미터 definition (type for inference) */
16
+ /** Parameter definition (type for inference) */
17
17
  $params;
18
18
  /** return type definition (type for inference) */
19
19
  $returns;
20
20
  /**
21
21
  * Procedure set description
22
22
  *
23
- * @param desc - Procedure description (DDL Comment으로 사용)
23
+ * @param desc - Procedure description (used as DDL Comment)
24
24
  * @returns new ProcedureBuilder instance
25
25
  */
26
26
  description(desc) {
@@ -29,7 +29,7 @@ class ProcedureBuilder {
29
29
  /**
30
30
  * Database set name
31
31
  *
32
- * @param db - Database 이름
32
+ * @param db - Database name
33
33
  * @returns new ProcedureBuilder instance
34
34
  *
35
35
  * @example
@@ -45,20 +45,20 @@ class ProcedureBuilder {
45
45
  *
46
46
  * MSSQL, PostgreSQLused in
47
47
  *
48
- * @param schema - Schema 이름 (MSSQL: dbo, PostgreSQL: public)
48
+ * @param schema - Schema name (MSSQL: dbo, PostgreSQL: public)
49
49
  * @returns new ProcedureBuilder instance
50
50
  */
51
51
  schema(schema) {
52
52
  return new ProcedureBuilder({ ...this.meta, schema });
53
53
  }
54
54
  /**
55
- * 파라미터 definition
55
+ * Parameter definition
56
56
  *
57
- * Procedure 입력 파라미터 definition
58
- * DBMS 파라미터 문법 차이 주의 (MSSQL: @param, MySQL/PostgreSQL: param)
57
+ * Define Procedure input parameters
58
+ * Note DBMS-specific parameter syntax differences (MSSQL: @param, MySQL/PostgreSQL: param)
59
59
  *
60
- * @template T - 파라미터 definition type
61
- * @param fn - Column factory 받아 파라미터 정의를 반환하는 function
60
+ * @template T - New parameter definition type
61
+ * @param fn - Function that receives a Column factory and returns parameter definitions
62
62
  * @returns new ProcedureBuilder instance
63
63
  *
64
64
  * @example
@@ -74,12 +74,12 @@ class ProcedureBuilder {
74
74
  return new ProcedureBuilder({ ...this.meta, params: fn(createColumnFactory()) });
75
75
  }
76
76
  /**
77
- * return type definition
77
+ * Return type definition
78
78
  *
79
- * Procedure return result Column definition
79
+ * Define Procedure return result columns
80
80
  *
81
- * @template T - return type definition
82
- * @param fn - Column factory 받아 return Column definition를 반환하는 function
81
+ * @template T - New return type definition
82
+ * @param fn - Function that receives a Column factory and returns Column definitions
83
83
  * @returns new ProcedureBuilder instance
84
84
  *
85
85
  * @example
@@ -97,14 +97,14 @@ class ProcedureBuilder {
97
97
  return new ProcedureBuilder({ ...this.meta, returns: fn(createColumnFactory()) });
98
98
  }
99
99
  /**
100
- * Procedure 본문 SQL 설정
100
+ * Set Procedure body SQL
101
101
  *
102
- * DBMS SQL 문법 차이 주의:
103
- * - MySQL: 파라미터명 그대로 (userId)
104
- * - MSSQL: @ 접두사 (@userId)
105
- * - PostgreSQL: RETURN QUERY 필요
102
+ * Note DBMS-specific SQL syntax differences:
103
+ * - MySQL: parameter name as-is (userId)
104
+ * - MSSQL: @ prefix (@userId)
105
+ * - PostgreSQL: RETURN QUERY required
106
106
  *
107
- * @param sql - Procedure 본문 SQL
107
+ * @param sql - Procedure body SQL
108
108
  * @returns new ProcedureBuilder instance
109
109
  *
110
110
  * @example
@@ -4,11 +4,11 @@ import { createRelationFactory, type InferDeepRelations, type RelationBuilderRec
4
4
  /**
5
5
  * Database Table definition builder
6
6
  *
7
- * Fluent API를 통해 Table column, PK, Index, 관계를 definition
8
- * DbContext에서 queryable() 함께 사용하여 type 안전한 query 작성
7
+ * Define Table columns, PK, indexes, and relations via Fluent API
8
+ * Use with DbContext's queryable() for type-safe query composition
9
9
  *
10
10
  * @template TColumns - Column definition record type
11
- * @template TRelations - relationship definition record type
11
+ * @template TRelations - Relation definition record type
12
12
  *
13
13
  * @example
14
14
  * ```typescript
@@ -24,7 +24,7 @@ import { createRelationFactory, type InferDeepRelations, type RelationBuilderRec
24
24
  * .primaryKey("id")
25
25
  * .indexes((i) => [i.index("email").unique()]);
26
26
  *
27
- * // DbContextused in
27
+ * // Used in DbContext
28
28
  * class MyDb extends DbContext {
29
29
  * readonly user = queryable(this, User);
30
30
  * }
@@ -46,25 +46,25 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
46
46
  };
47
47
  /** Column definition (type for inference) */
48
48
  readonly $columns: TColumns;
49
- /** relationship definition (type for inference) */
49
+ /** Relation definition (type for inference) */
50
50
  readonly $relations: TRelations;
51
- /** 전체 Type inference (column + relationship) */
51
+ /** Full Type inference (column + relation) */
52
52
  readonly $inferSelect: InferColumns<TColumns> & InferDeepRelations<TRelations>;
53
- /** column만 Type inference */
53
+ /** Column-only Type inference */
54
54
  readonly $inferColumns: InferColumns<TColumns>;
55
- /** INSERT Type inference (autoIncrement exclude, nullable/default optional) */
55
+ /** INSERT Type inference (autoIncrement excluded, nullable/default are optional) */
56
56
  readonly $inferInsert: InferInsertColumns<TColumns>;
57
- /** UPDATE Type inference (모든 field optional) */
57
+ /** UPDATE Type inference (all fields optional) */
58
58
  readonly $inferUpdate: InferUpdateColumns<TColumns>;
59
59
  /**
60
60
  * @param meta - Table Metadata
61
- * @param meta.name - Table 이름
62
- * @param meta.description - Table description (주석)
63
- * @param meta.database - Database 이름
64
- * @param meta.schema - Schema 이름 (MSSQL/PostgreSQL)
61
+ * @param meta.name - Table name
62
+ * @param meta.description - Table description (comment)
63
+ * @param meta.database - Database name
64
+ * @param meta.schema - Schema name (MSSQL/PostgreSQL)
65
65
  * @param meta.columns - Column definition
66
66
  * @param meta.primaryKey - PK column array
67
- * @param meta.relations - relationship definition
67
+ * @param meta.relations - Relation definition
68
68
  * @param meta.indexes - Index definition
69
69
  */
70
70
  constructor(meta: {
@@ -80,14 +80,14 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
80
80
  /**
81
81
  * Table set description
82
82
  *
83
- * @param desc - Table description (DDL Comment으로 사용)
83
+ * @param desc - Table description (used as DDL Comment)
84
84
  * @returns new TableBuilder instance
85
85
  */
86
86
  description(desc: string): TableBuilder<TColumns, TRelations>;
87
87
  /**
88
88
  * Database set name
89
89
  *
90
- * @param db - Database 이름
90
+ * @param db - Database name
91
91
  * @returns new TableBuilder instance
92
92
  *
93
93
  * @example
@@ -99,9 +99,9 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
99
99
  /**
100
100
  * schema set name
101
101
  *
102
- * MSSQL, PostgreSQLused in
102
+ * Used in MSSQL, PostgreSQL
103
103
  *
104
- * @param schema - Schema 이름 (MSSQL: dbo, PostgreSQL: public)
104
+ * @param schema - Schema name (MSSQL: dbo, PostgreSQL: public)
105
105
  * @returns new TableBuilder instance
106
106
  *
107
107
  * @example
@@ -115,10 +115,10 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
115
115
  /**
116
116
  * Column definition
117
117
  *
118
- * column factory를 통해 type 안전한 Column definition
118
+ * Type-safe Column definition through column factory
119
119
  *
120
- * @template TNewColumnDefs - Column definition type
121
- * @param fn - Column factory 받아 Column definition를 반환하는 function
120
+ * @template TNewColumnDefs - New Column definition type
121
+ * @param fn - Function that receives a Column factory and returns Column definitions
122
122
  * @returns new TableBuilder instance
123
123
  *
124
124
  * @example
@@ -134,19 +134,19 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
134
134
  */
135
135
  columns<TNewColumnDefs extends ColumnBuilderRecord>(fn: (c: ReturnType<typeof createColumnFactory>) => TNewColumnDefs): TableBuilder<TNewColumnDefs, TRelations>;
136
136
  /**
137
- * Primary Key 설정
137
+ * Primary Key configuration
138
138
  *
139
- * @param columns - PK를 구성할 column name들 (복합 PK 가능)
139
+ * @param columns - Column names composing the PK (composite PK supported)
140
140
  * @returns new TableBuilder instance
141
141
  *
142
142
  * @example
143
143
  * ```typescript
144
- * // 단일 PK
144
+ * // Single PK
145
145
  * const User = Table("User")
146
146
  * .columns((c) => ({ id: c.bigint() }))
147
147
  * .primaryKey("id");
148
148
  *
149
- * // 복합 PK
149
+ * // Composite PK
150
150
  * const UserRole = Table("UserRole")
151
151
  * .columns((c) => ({
152
152
  * userId: c.bigint(),
@@ -159,7 +159,7 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
159
159
  /**
160
160
  * Index definition
161
161
  *
162
- * @param fn - Index factory 받아 Index 배열을 반환하는 function
162
+ * @param fn - Function that receives an Index factory and returns an Index array
163
163
  * @returns new TableBuilder instance
164
164
  *
165
165
  * @example
@@ -178,12 +178,12 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
178
178
  */
179
179
  indexes(fn: (i: ReturnType<typeof createIndexFactory<keyof TColumns & string>>) => IndexBuilder<string[]>[]): TableBuilder<TColumns, TRelations>;
180
180
  /**
181
- * relationship definition
181
+ * Relation definition
182
182
  *
183
- * FK, 역참조 Table 간 relationship 설정
183
+ * Set up FK, reverse-references, and other inter-Table relations
184
184
  *
185
- * @template T - relationship definition type
186
- * @param fn - relationship factory 받아 relationship 정의를 반환하는 function
185
+ * @template T - Relation definition type
186
+ * @param fn - Function that receives a relation factory and returns relation definitions
187
187
  * @returns new TableBuilder instance
188
188
  *
189
189
  * @example
@@ -196,7 +196,7 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
196
196
  * }))
197
197
  * .primaryKey("id")
198
198
  * .relations((r) => ({
199
- * // FK relationship (N:1)
199
+ * // FK relation (N:1)
200
200
  * author: r.foreignKey(["authorId"], () => User),
201
201
  * }));
202
202
  *
@@ -207,27 +207,27 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
207
207
  * }))
208
208
  * .primaryKey("id")
209
209
  * .relations((r) => ({
210
- * // 역참조 (1:N)
210
+ * // Reverse-reference (1:N)
211
211
  * posts: r.foreignKeyTarget(() => Post, "author"),
212
212
  * }));
213
213
  * ```
214
214
  *
215
215
  * @see {@link ForeignKeyBuilder} FK builder
216
- * @see {@link ForeignKeyTargetBuilder} FK 역참조 builder
216
+ * @see {@link ForeignKeyTargetBuilder} FK reverse-reference builder
217
217
  */
218
218
  relations<T extends RelationBuilderRecord>(fn: (r: ReturnType<typeof createRelationFactory<this, keyof TColumns & string>>) => T): TableBuilder<TColumns, T>;
219
219
  }
220
220
  /**
221
- * Table builder Generate factory function
221
+ * Table builder factory function
222
222
  *
223
- * TableBuilder 생성하여 Fluent API로 Table schema definition
223
+ * Creates a TableBuilder for defining Table schema via Fluent API
224
224
  *
225
- * @param name - Table 이름
225
+ * @param name - Table name
226
226
  * @returns TableBuilder instance
227
227
  *
228
228
  * @example
229
229
  * ```typescript
230
- * // Basic 사용
230
+ * // Basic usage
231
231
  * const User = Table("User")
232
232
  * .database("mydb")
233
233
  * .columns((c) => ({
@@ -238,7 +238,7 @@ export declare class TableBuilder<TColumns extends ColumnBuilderRecord, TRelatio
238
238
  * .primaryKey("id")
239
239
  * .indexes((i) => [i.index("email").unique()]);
240
240
  *
241
- * // relationship include
241
+ * // With relations
242
242
  * const Post = Table("Post")
243
243
  * .database("mydb")
244
244
  * .columns((c) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"table-builder.d.ts","sourceRoot":"","sources":["..\\..\\src\\schema\\table-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAMpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,YAAY,CACvB,QAAQ,SAAS,mBAAmB,EACpC,UAAU,SAAS,qBAAqB;IA4BtC,QAAQ,CAAC,IAAI,E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,OAAO,qBAAqB,CAAC,IAAI,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,GACpF,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;CAM7B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,4DAEjC"}
@@ -8,13 +8,13 @@ import {
8
8
  class TableBuilder {
9
9
  /**
10
10
  * @param meta - Table Metadata
11
- * @param meta.name - Table 이름
12
- * @param meta.description - Table description (주석)
13
- * @param meta.database - Database 이름
14
- * @param meta.schema - Schema 이름 (MSSQL/PostgreSQL)
11
+ * @param meta.name - Table name
12
+ * @param meta.description - Table description (comment)
13
+ * @param meta.database - Database name
14
+ * @param meta.schema - Schema name (MSSQL/PostgreSQL)
15
15
  * @param meta.columns - Column definition
16
16
  * @param meta.primaryKey - PK column array
17
- * @param meta.relations - relationship definition
17
+ * @param meta.relations - Relation definition
18
18
  * @param meta.indexes - Index definition
19
19
  */
20
20
  constructor(meta) {
@@ -22,20 +22,20 @@ class TableBuilder {
22
22
  }
23
23
  /** Column definition (type for inference) */
24
24
  $columns;
25
- /** relationship definition (type for inference) */
25
+ /** Relation definition (type for inference) */
26
26
  $relations;
27
- /** 전체 Type inference (column + relationship) */
27
+ /** Full Type inference (column + relation) */
28
28
  $inferSelect;
29
- /** column만 Type inference */
29
+ /** Column-only Type inference */
30
30
  $inferColumns;
31
- /** INSERT Type inference (autoIncrement exclude, nullable/default optional) */
31
+ /** INSERT Type inference (autoIncrement excluded, nullable/default are optional) */
32
32
  $inferInsert;
33
- /** UPDATE Type inference (모든 field optional) */
33
+ /** UPDATE Type inference (all fields optional) */
34
34
  $inferUpdate;
35
35
  /**
36
36
  * Table set description
37
37
  *
38
- * @param desc - Table description (DDL Comment으로 사용)
38
+ * @param desc - Table description (used as DDL Comment)
39
39
  * @returns new TableBuilder instance
40
40
  */
41
41
  description(desc) {
@@ -44,7 +44,7 @@ class TableBuilder {
44
44
  /**
45
45
  * Database set name
46
46
  *
47
- * @param db - Database 이름
47
+ * @param db - Database name
48
48
  * @returns new TableBuilder instance
49
49
  *
50
50
  * @example
@@ -58,9 +58,9 @@ class TableBuilder {
58
58
  /**
59
59
  * schema set name
60
60
  *
61
- * MSSQL, PostgreSQLused in
61
+ * Used in MSSQL, PostgreSQL
62
62
  *
63
- * @param schema - Schema 이름 (MSSQL: dbo, PostgreSQL: public)
63
+ * @param schema - Schema name (MSSQL: dbo, PostgreSQL: public)
64
64
  * @returns new TableBuilder instance
65
65
  *
66
66
  * @example
@@ -76,10 +76,10 @@ class TableBuilder {
76
76
  /**
77
77
  * Column definition
78
78
  *
79
- * column factory를 통해 type 안전한 Column definition
79
+ * Type-safe Column definition through column factory
80
80
  *
81
- * @template TNewColumnDefs - Column definition type
82
- * @param fn - Column factory 받아 Column definition를 반환하는 function
81
+ * @template TNewColumnDefs - New Column definition type
82
+ * @param fn - Function that receives a Column factory and returns Column definitions
83
83
  * @returns new TableBuilder instance
84
84
  *
85
85
  * @example
@@ -100,19 +100,19 @@ class TableBuilder {
100
100
  });
101
101
  }
102
102
  /**
103
- * Primary Key 설정
103
+ * Primary Key configuration
104
104
  *
105
- * @param columns - PK를 구성할 column name들 (복합 PK 가능)
105
+ * @param columns - Column names composing the PK (composite PK supported)
106
106
  * @returns new TableBuilder instance
107
107
  *
108
108
  * @example
109
109
  * ```typescript
110
- * // 단일 PK
110
+ * // Single PK
111
111
  * const User = Table("User")
112
112
  * .columns((c) => ({ id: c.bigint() }))
113
113
  * .primaryKey("id");
114
114
  *
115
- * // 복합 PK
115
+ * // Composite PK
116
116
  * const UserRole = Table("UserRole")
117
117
  * .columns((c) => ({
118
118
  * userId: c.bigint(),
@@ -130,7 +130,7 @@ class TableBuilder {
130
130
  /**
131
131
  * Index definition
132
132
  *
133
- * @param fn - Index factory 받아 Index 배열을 반환하는 function
133
+ * @param fn - Function that receives an Index factory and returns an Index array
134
134
  * @returns new TableBuilder instance
135
135
  *
136
136
  * @example
@@ -154,12 +154,12 @@ class TableBuilder {
154
154
  });
155
155
  }
156
156
  /**
157
- * relationship definition
157
+ * Relation definition
158
158
  *
159
- * FK, 역참조 Table 간 relationship 설정
159
+ * Set up FK, reverse-references, and other inter-Table relations
160
160
  *
161
- * @template T - relationship definition type
162
- * @param fn - relationship factory 받아 relationship 정의를 반환하는 function
161
+ * @template T - Relation definition type
162
+ * @param fn - Function that receives a relation factory and returns relation definitions
163
163
  * @returns new TableBuilder instance
164
164
  *
165
165
  * @example
@@ -172,7 +172,7 @@ class TableBuilder {
172
172
  * }))
173
173
  * .primaryKey("id")
174
174
  * .relations((r) => ({
175
- * // FK relationship (N:1)
175
+ * // FK relation (N:1)
176
176
  * author: r.foreignKey(["authorId"], () => User),
177
177
  * }));
178
178
  *
@@ -183,13 +183,13 @@ class TableBuilder {
183
183
  * }))
184
184
  * .primaryKey("id")
185
185
  * .relations((r) => ({
186
- * // 역참조 (1:N)
186
+ * // Reverse-reference (1:N)
187
187
  * posts: r.foreignKeyTarget(() => Post, "author"),
188
188
  * }));
189
189
  * ```
190
190
  *
191
191
  * @see {@link ForeignKeyBuilder} FK builder
192
- * @see {@link ForeignKeyTargetBuilder} FK 역참조 builder
192
+ * @see {@link ForeignKeyTargetBuilder} FK reverse-reference builder
193
193
  */
194
194
  relations(fn) {
195
195
  return new TableBuilder({