@simplysm/orm-common 13.0.69 → 13.0.70

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 (204) hide show
  1. package/README.md +54 -1447
  2. package/dist/create-db-context.d.ts +10 -10
  3. package/dist/create-db-context.js +9 -9
  4. package/dist/create-db-context.js.map +1 -1
  5. package/dist/ddl/column-ddl.d.ts +4 -4
  6. package/dist/ddl/initialize.d.ts +17 -17
  7. package/dist/ddl/initialize.js +2 -2
  8. package/dist/ddl/initialize.js.map +1 -1
  9. package/dist/ddl/relation-ddl.d.ts +6 -6
  10. package/dist/ddl/schema-ddl.d.ts +4 -4
  11. package/dist/ddl/table-ddl.d.ts +24 -24
  12. package/dist/ddl/table-ddl.js +4 -4
  13. package/dist/ddl/table-ddl.js.map +1 -1
  14. package/dist/errors/db-transaction-error.d.ts +15 -15
  15. package/dist/errors/db-transaction-error.d.ts.map +1 -1
  16. package/dist/exec/executable.d.ts +23 -23
  17. package/dist/exec/executable.js +3 -3
  18. package/dist/exec/executable.js.map +1 -1
  19. package/dist/exec/queryable.d.ts +160 -160
  20. package/dist/exec/queryable.js +119 -119
  21. package/dist/exec/queryable.js.map +1 -1
  22. package/dist/exec/search-parser.d.ts +37 -37
  23. package/dist/exec/search-parser.d.ts.map +1 -1
  24. package/dist/expr/expr-unit.d.ts +4 -4
  25. package/dist/expr/expr.d.ts +257 -257
  26. package/dist/expr/expr.js +265 -265
  27. package/dist/expr/expr.js.map +1 -1
  28. package/dist/query-builder/base/expr-renderer-base.d.ts +9 -9
  29. package/dist/query-builder/base/expr-renderer-base.js +2 -2
  30. package/dist/query-builder/base/expr-renderer-base.js.map +1 -1
  31. package/dist/query-builder/base/query-builder-base.d.ts +26 -26
  32. package/dist/query-builder/base/query-builder-base.d.ts.map +1 -1
  33. package/dist/query-builder/base/query-builder-base.js +22 -22
  34. package/dist/query-builder/base/query-builder-base.js.map +1 -1
  35. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts +4 -4
  36. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts.map +1 -1
  37. package/dist/query-builder/mssql/mssql-expr-renderer.js +18 -18
  38. package/dist/query-builder/mssql/mssql-expr-renderer.js.map +1 -1
  39. package/dist/query-builder/mssql/mssql-query-builder.d.ts +2 -2
  40. package/dist/query-builder/mssql/mssql-query-builder.d.ts.map +1 -1
  41. package/dist/query-builder/mssql/mssql-query-builder.js +11 -11
  42. package/dist/query-builder/mssql/mssql-query-builder.js.map +1 -1
  43. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts +4 -4
  44. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts.map +1 -1
  45. package/dist/query-builder/mysql/mysql-expr-renderer.js +17 -17
  46. package/dist/query-builder/mysql/mysql-expr-renderer.js.map +1 -1
  47. package/dist/query-builder/mysql/mysql-query-builder.d.ts +8 -8
  48. package/dist/query-builder/mysql/mysql-query-builder.d.ts.map +1 -1
  49. package/dist/query-builder/mysql/mysql-query-builder.js +5 -5
  50. package/dist/query-builder/mysql/mysql-query-builder.js.map +1 -1
  51. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts +4 -4
  52. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts.map +1 -1
  53. package/dist/query-builder/postgresql/postgresql-expr-renderer.js +17 -17
  54. package/dist/query-builder/postgresql/postgresql-expr-renderer.js.map +1 -1
  55. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts +5 -5
  56. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts.map +1 -1
  57. package/dist/query-builder/postgresql/postgresql-query-builder.js +8 -8
  58. package/dist/query-builder/postgresql/postgresql-query-builder.js.map +1 -1
  59. package/dist/query-builder/query-builder.d.ts +1 -1
  60. package/dist/schema/factory/column-builder.d.ts +79 -79
  61. package/dist/schema/factory/column-builder.js +42 -42
  62. package/dist/schema/factory/index-builder.d.ts +39 -39
  63. package/dist/schema/factory/index-builder.js +26 -26
  64. package/dist/schema/factory/relation-builder.d.ts +99 -99
  65. package/dist/schema/factory/relation-builder.d.ts.map +1 -1
  66. package/dist/schema/factory/relation-builder.js +38 -38
  67. package/dist/schema/procedure-builder.d.ts +49 -49
  68. package/dist/schema/procedure-builder.d.ts.map +1 -1
  69. package/dist/schema/procedure-builder.js +33 -33
  70. package/dist/schema/table-builder.d.ts +59 -59
  71. package/dist/schema/table-builder.d.ts.map +1 -1
  72. package/dist/schema/table-builder.js +43 -43
  73. package/dist/schema/view-builder.d.ts +49 -49
  74. package/dist/schema/view-builder.d.ts.map +1 -1
  75. package/dist/schema/view-builder.js +32 -32
  76. package/dist/types/column.d.ts +22 -22
  77. package/dist/types/column.js +1 -1
  78. package/dist/types/column.js.map +1 -1
  79. package/dist/types/db.d.ts +40 -40
  80. package/dist/types/expr.d.ts +59 -59
  81. package/dist/types/expr.d.ts.map +1 -1
  82. package/dist/types/query-def.d.ts +44 -44
  83. package/dist/types/query-def.d.ts.map +1 -1
  84. package/dist/utils/result-parser.d.ts +11 -11
  85. package/dist/utils/result-parser.js +3 -3
  86. package/dist/utils/result-parser.js.map +1 -1
  87. package/package.json +5 -5
  88. package/src/create-db-context.ts +20 -20
  89. package/src/ddl/column-ddl.ts +4 -4
  90. package/src/ddl/initialize.ts +259 -259
  91. package/src/ddl/relation-ddl.ts +89 -89
  92. package/src/ddl/schema-ddl.ts +4 -4
  93. package/src/ddl/table-ddl.ts +189 -189
  94. package/src/errors/db-transaction-error.ts +13 -13
  95. package/src/exec/executable.ts +25 -25
  96. package/src/exec/queryable.ts +2033 -2033
  97. package/src/exec/search-parser.ts +57 -57
  98. package/src/expr/expr-unit.ts +4 -4
  99. package/src/expr/expr.ts +2140 -2140
  100. package/src/query-builder/base/expr-renderer-base.ts +237 -237
  101. package/src/query-builder/base/query-builder-base.ts +213 -213
  102. package/src/query-builder/mssql/mssql-expr-renderer.ts +607 -607
  103. package/src/query-builder/mssql/mssql-query-builder.ts +650 -650
  104. package/src/query-builder/mysql/mysql-expr-renderer.ts +613 -613
  105. package/src/query-builder/mysql/mysql-query-builder.ts +759 -759
  106. package/src/query-builder/postgresql/postgresql-expr-renderer.ts +611 -611
  107. package/src/query-builder/postgresql/postgresql-query-builder.ts +686 -686
  108. package/src/query-builder/query-builder.ts +19 -19
  109. package/src/schema/factory/column-builder.ts +423 -423
  110. package/src/schema/factory/index-builder.ts +164 -164
  111. package/src/schema/factory/relation-builder.ts +453 -453
  112. package/src/schema/procedure-builder.ts +232 -232
  113. package/src/schema/table-builder.ts +319 -319
  114. package/src/schema/view-builder.ts +221 -221
  115. package/src/types/column.ts +188 -188
  116. package/src/types/db.ts +208 -208
  117. package/src/types/expr.ts +697 -697
  118. package/src/types/query-def.ts +513 -513
  119. package/src/utils/result-parser.ts +458 -458
  120. package/tests/db-context/create-db-context.spec.ts +224 -0
  121. package/tests/db-context/define-db-context.spec.ts +68 -0
  122. package/tests/ddl/basic.expected.ts +341 -0
  123. package/tests/ddl/basic.spec.ts +714 -0
  124. package/tests/ddl/column-builder.expected.ts +310 -0
  125. package/tests/ddl/column-builder.spec.ts +637 -0
  126. package/tests/ddl/index-builder.expected.ts +38 -0
  127. package/tests/ddl/index-builder.spec.ts +202 -0
  128. package/tests/ddl/procedure-builder.expected.ts +52 -0
  129. package/tests/ddl/procedure-builder.spec.ts +234 -0
  130. package/tests/ddl/relation-builder.expected.ts +36 -0
  131. package/tests/ddl/relation-builder.spec.ts +372 -0
  132. package/tests/ddl/table-builder.expected.ts +113 -0
  133. package/tests/ddl/table-builder.spec.ts +433 -0
  134. package/tests/ddl/view-builder.expected.ts +38 -0
  135. package/tests/ddl/view-builder.spec.ts +176 -0
  136. package/tests/dml/delete.expected.ts +96 -0
  137. package/tests/dml/delete.spec.ts +160 -0
  138. package/tests/dml/insert.expected.ts +192 -0
  139. package/tests/dml/insert.spec.ts +288 -0
  140. package/tests/dml/update.expected.ts +176 -0
  141. package/tests/dml/update.spec.ts +318 -0
  142. package/tests/dml/upsert.expected.ts +215 -0
  143. package/tests/dml/upsert.spec.ts +242 -0
  144. package/tests/errors/queryable-errors.spec.ts +177 -0
  145. package/tests/escape.spec.ts +100 -0
  146. package/tests/examples/pivot.expected.ts +211 -0
  147. package/tests/examples/pivot.spec.ts +533 -0
  148. package/tests/examples/sampling.expected.ts +69 -0
  149. package/tests/examples/sampling.spec.ts +104 -0
  150. package/tests/examples/unpivot.expected.ts +120 -0
  151. package/tests/examples/unpivot.spec.ts +226 -0
  152. package/tests/exec/search-parser.spec.ts +283 -0
  153. package/tests/executable/basic.expected.ts +18 -0
  154. package/tests/executable/basic.spec.ts +54 -0
  155. package/tests/expr/comparison.expected.ts +282 -0
  156. package/tests/expr/comparison.spec.ts +400 -0
  157. package/tests/expr/conditional.expected.ts +134 -0
  158. package/tests/expr/conditional.spec.ts +276 -0
  159. package/tests/expr/date.expected.ts +332 -0
  160. package/tests/expr/date.spec.ts +526 -0
  161. package/tests/expr/math.expected.ts +62 -0
  162. package/tests/expr/math.spec.ts +106 -0
  163. package/tests/expr/string.expected.ts +218 -0
  164. package/tests/expr/string.spec.ts +356 -0
  165. package/tests/expr/utility.expected.ts +147 -0
  166. package/tests/expr/utility.spec.ts +182 -0
  167. package/tests/select/basic.expected.ts +322 -0
  168. package/tests/select/basic.spec.ts +502 -0
  169. package/tests/select/filter.expected.ts +357 -0
  170. package/tests/select/filter.spec.ts +1068 -0
  171. package/tests/select/group.expected.ts +169 -0
  172. package/tests/select/group.spec.ts +244 -0
  173. package/tests/select/join.expected.ts +582 -0
  174. package/tests/select/join.spec.ts +805 -0
  175. package/tests/select/order.expected.ts +150 -0
  176. package/tests/select/order.spec.ts +189 -0
  177. package/tests/select/recursive-cte.expected.ts +244 -0
  178. package/tests/select/recursive-cte.spec.ts +514 -0
  179. package/tests/select/result-meta.spec.ts +270 -0
  180. package/tests/select/subquery.expected.ts +363 -0
  181. package/tests/select/subquery.spec.ts +537 -0
  182. package/tests/select/view.expected.ts +155 -0
  183. package/tests/select/view.spec.ts +235 -0
  184. package/tests/select/window.expected.ts +345 -0
  185. package/tests/select/window.spec.ts +618 -0
  186. package/tests/setup/MockExecutor.ts +18 -0
  187. package/tests/setup/TestDbContext.ts +59 -0
  188. package/tests/setup/models/Company.ts +13 -0
  189. package/tests/setup/models/Employee.ts +10 -0
  190. package/tests/setup/models/MonthlySales.ts +11 -0
  191. package/tests/setup/models/Post.ts +16 -0
  192. package/tests/setup/models/Sales.ts +10 -0
  193. package/tests/setup/models/User.ts +19 -0
  194. package/tests/setup/procedure/GetAllUsers.ts +9 -0
  195. package/tests/setup/procedure/GetUserById.ts +12 -0
  196. package/tests/setup/test-utils.ts +72 -0
  197. package/tests/setup/views/ActiveUsers.ts +8 -0
  198. package/tests/setup/views/UserSummary.ts +11 -0
  199. package/tests/types/nullable-queryable-record.spec.ts +145 -0
  200. package/tests/utils/result-parser-perf.spec.ts +210 -0
  201. package/tests/utils/result-parser.spec.ts +701 -0
  202. package/docs/expressions.md +0 -172
  203. package/docs/queries.md +0 -444
  204. package/docs/schema.md +0 -245
@@ -10,114 +10,114 @@ interface WinSpecInput {
10
10
  orderBy?: [ExprInput<ColumnPrimitive>, ("ASC" | "DESC")?][];
11
11
  }
12
12
  /**
13
- * Switch 표현식 빌더 인터페이스
13
+ * Switch expression builder interface
14
14
  */
15
15
  export interface SwitchExprBuilder<TPrimitive extends ColumnPrimitive> {
16
16
  case(condition: WhereExprUnit, then: ExprInput<TPrimitive>): SwitchExprBuilder<TPrimitive>;
17
17
  default(value: ExprInput<TPrimitive>): ExprUnit<TPrimitive>;
18
18
  }
19
19
  /**
20
- * Dialect 독립적인 SQL 표현식 빌더
20
+ * Dialect-independent SQL expression builder
21
21
  *
22
- * SQL 문자열이 아닌 JSON AST(Expr) 생성하여, QueryBuilder
23
- * DBMS(MySQL, MSSQL, PostgreSQL)에 맞게 변환
22
+ * Generates JSON AST (Expr) instead of SQL strings, which QueryBuilder
23
+ * converts to each DBMS (MySQL, MSSQL, PostgreSQL)
24
24
  *
25
25
  * @example
26
26
  * ```typescript
27
- * // WHERE 조건
27
+ * // WHERE condition
28
28
  * db.user().where((u) => [
29
29
  * expr.eq(u.status, "active"),
30
30
  * expr.gt(u.age, 18),
31
31
  * ])
32
32
  *
33
- * // SELECT 표현식
33
+ * // SELECT expression
34
34
  * db.user().select((u) => ({
35
35
  * name: expr.concat(u.firstName, " ", u.lastName),
36
36
  * age: expr.dateDiff("year", u.birthDate, expr.val("DateOnly", DateOnly.today())),
37
37
  * }))
38
38
  *
39
- * // 집계 함수
39
+ * // Aggregate function
40
40
  * db.order().groupBy((o) => o.userId).select((o) => ({
41
41
  * userId: o.userId,
42
42
  * total: expr.sum(o.amount),
43
43
  * }))
44
44
  * ```
45
45
  *
46
- * @see {@link Queryable} 쿼리 빌더 클래스
47
- * @see {@link ExprUnit} 표현식 래퍼 클래스
46
+ * @see {@link Queryable} Query builder class
47
+ * @see {@link ExprUnit} Expression wrapper class
48
48
  */
49
49
  export declare const expr: {
50
50
  /**
51
- * 리터럴 값을 ExprUnit으로 래핑
51
+ * Wrap literal value as ExprUnit
52
52
  *
53
- * dataType에 맞는 base 타입으로 widening하여 리터럴 타입 제거
53
+ * Widen to base type matching dataType, remove literal type
54
54
  *
55
- * @param dataType - 값의 데이터 타입 ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
56
- * @param value - 래핑할 (undefined 허용)
57
- * @returns 래핑된 ExprUnit 인스턴스
55
+ * @param dataType - Value의 data type ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
56
+ * @param value - 래핑할 value (undefined allow)
57
+ * @returns 래핑된 ExprUnit instance
58
58
  *
59
59
  * @example
60
60
  * ```typescript
61
- * // 문자열
61
+ * // String value
62
62
  * expr.val("string", "active")
63
63
  *
64
- * // 숫자
64
+ * // Number value
65
65
  * expr.val("number", 100)
66
66
  *
67
- * // 날짜
67
+ * // Date value
68
68
  * expr.val("DateOnly", DateOnly.today())
69
69
  *
70
- * // undefined
70
+ * // undefined value
71
71
  * expr.val("string", undefined)
72
72
  * ```
73
73
  */
74
74
  val<TStr extends ColumnPrimitiveStr, T extends ColumnPrimitiveMap[TStr] | undefined>(dataType: TStr, value: T): ExprUnit<T extends undefined ? ColumnPrimitiveMap[TStr] | undefined : ColumnPrimitiveMap[TStr]>;
75
75
  /**
76
- * 컬럼 참조를 생성
76
+ * Generate column reference
77
77
  *
78
- * 일반적으로 Queryable 콜백 프록시 객체를 사용하므로 직접 호출할 일이 적음
78
+ * Typically proxy objects are used inside Queryable callbacks
79
79
  *
80
- * @param dataType - 컬럼의 데이터 타입
81
- * @param path - 컬럼 경로 (테이블 alias, 컬럼명 )
82
- * @returns 컬럼 참조 ExprUnit 인스턴스
80
+ * @param dataType - Column data type
81
+ * @param path - Column path (table alias, column name, etc.)
82
+ * @returns Column reference ExprUnit instance
83
83
  *
84
84
  * @example
85
85
  * ```typescript
86
- * // 직접 컬럼 참조 (내부용)
86
+ * // Direct column reference (internal use)
87
87
  * expr.col("string", "T1", "name")
88
88
  * ```
89
89
  */
90
90
  col<TStr extends ColumnPrimitiveStr>(dataType: ColumnPrimitiveStr, ...path: string[]): ExprUnit<ColumnPrimitiveMap[TStr] | undefined>;
91
91
  /**
92
- * Raw SQL 표현식 생성 (escape hatch)
92
+ * Raw SQL expression Generate (escape hatch)
93
93
  *
94
- * ORM에서 지원하지 않는 DB 함수나 문법을 직접 사용할 사용.
95
- * 태그 템플릿 리터럴 형식으로 사용하며, 보간된 값은 자동으로 파라미터화됨
94
+ * Use when you need to directly use DB-specific functions or syntax not supported by the ORM.
95
+ * Used as tagged template literal, interpolated values are automatically parameterized
96
96
  *
97
- * @param dataType - 반환될 값의 데이터 타입
98
- * @returns 태그 템플릿 함수
97
+ * @param dataType - Data type of the returned value
98
+ * @returns Tagged template function
99
99
  *
100
100
  * @example
101
101
  * ```typescript
102
- * // MySQL JSON 함수 사용
102
+ * // Using MySQL JSON function
103
103
  * db.user().select((u) => ({
104
104
  * name: u.name,
105
105
  * data: expr.raw("string")`JSON_EXTRACT(${u.metadata}, '$.email')`,
106
106
  * }))
107
107
  *
108
- * // PostgreSQL 배열 함수
108
+ * // PostgreSQL array function
109
109
  * expr.raw("number")`ARRAY_LENGTH(${u.tags}, 1)`
110
110
  * ```
111
111
  */
112
112
  raw<T extends ColumnPrimitiveStr>(dataType: T): (strings: TemplateStringsArray, ...values: ExprInput<ColumnPrimitive>[]) => ExprUnit<ColumnPrimitiveMap[T] | undefined>;
113
113
  /**
114
- * 동등 비교 (NULL-safe)
114
+ * Equality comparison (NULL-safe)
115
115
  *
116
- * NULL 값도 안전하게 비교 (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
116
+ * Safely compare even NULL values (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
117
117
  *
118
- * @param source - 비교할 컬럼 또는 표현식
119
- * @param target - 비교 대상 또는 표현식
120
- * @returns WHERE 조건 표현식
118
+ * @param source - Column or expression to compare
119
+ * @param target - Target value or expression for comparison
120
+ * @returns WHERE condition expression
121
121
  *
122
122
  * @example
123
123
  * ```typescript
@@ -127,11 +127,11 @@ export declare const expr: {
127
127
  */
128
128
  eq<T extends ColumnPrimitive>(source: ExprUnit<T>, target: ExprInput<T>): WhereExprUnit;
129
129
  /**
130
- * 초과 비교 (>)
130
+ * Greater than comparison (>)
131
131
  *
132
- * @param source - 비교할 컬럼 또는 표현식
133
- * @param target - 비교 대상 또는 표현식
134
- * @returns WHERE 조건 표현식
132
+ * @param source - Column or expression to compare
133
+ * @param target - Target value or expression for comparison
134
+ * @returns WHERE condition expression
135
135
  *
136
136
  * @example
137
137
  * ```typescript
@@ -141,11 +141,11 @@ export declare const expr: {
141
141
  */
142
142
  gt<T extends ColumnPrimitive>(source: ExprUnit<T>, target: ExprInput<T>): WhereExprUnit;
143
143
  /**
144
- * 미만 비교 (<)
144
+ * Less than comparison (<)
145
145
  *
146
- * @param source - 비교할 컬럼 또는 표현식
147
- * @param target - 비교 대상 또는 표현식
148
- * @returns WHERE 조건 표현식
146
+ * @param source - Column or expression to compare
147
+ * @param target - Target value or expression for comparison
148
+ * @returns WHERE condition expression
149
149
  *
150
150
  * @example
151
151
  * ```typescript
@@ -155,11 +155,11 @@ export declare const expr: {
155
155
  */
156
156
  lt<T extends ColumnPrimitive>(source: ExprUnit<T>, target: ExprInput<T>): WhereExprUnit;
157
157
  /**
158
- * 이상 비교 (>=)
158
+ * Greater than or equal comparison (>=)
159
159
  *
160
- * @param source - 비교할 컬럼 또는 표현식
161
- * @param target - 비교 대상 또는 표현식
162
- * @returns WHERE 조건 표현식
160
+ * @param source - Column or expression to compare
161
+ * @param target - Target value or expression for comparison
162
+ * @returns WHERE condition expression
163
163
  *
164
164
  * @example
165
165
  * ```typescript
@@ -169,11 +169,11 @@ export declare const expr: {
169
169
  */
170
170
  gte<T extends ColumnPrimitive>(source: ExprUnit<T>, target: ExprInput<T>): WhereExprUnit;
171
171
  /**
172
- * 이하 비교 (<=)
172
+ * Less than or equal comparison (<=)
173
173
  *
174
- * @param source - 비교할 컬럼 또는 표현식
175
- * @param target - 비교 대상 또는 표현식
176
- * @returns WHERE 조건 표현식
174
+ * @param source - Column or expression to compare
175
+ * @param target - Target value or expression for comparison
176
+ * @returns WHERE condition expression
177
177
  *
178
178
  * @example
179
179
  * ```typescript
@@ -183,22 +183,22 @@ export declare const expr: {
183
183
  */
184
184
  lte<T extends ColumnPrimitive>(source: ExprUnit<T>, target: ExprInput<T>): WhereExprUnit;
185
185
  /**
186
- * 범위 비교 (BETWEEN)
186
+ * range comparison (BETWEEN)
187
187
  *
188
188
  * from/to가 undefined이면 해당 방향은 무제한
189
189
  *
190
- * @param source - 비교할 컬럼 또는 표현식
191
- * @param from - 시작 (undefined이면 하한 없음)
192
- * @param to - 끝 (undefined이면 상한 없음)
193
- * @returns WHERE 조건 표현식
190
+ * @param source - Column or expression to compare
191
+ * @param from - start value (undefined이면 하한 N/A)
192
+ * @param to - 끝 value (undefined이면 상한 N/A)
193
+ * @returns WHERE condition expression
194
194
  *
195
195
  * @example
196
196
  * ```typescript
197
- * // 범위 지정
197
+ * // range 지정
198
198
  * db.user().where((u) => [expr.between(u.age, 18, 65)])
199
199
  * // WHERE age BETWEEN 18 AND 65
200
200
  *
201
- * // 하한만 지정
201
+ * // Specify only lower bound
202
202
  * db.user().where((u) => [expr.between(u.age, 18, undefined)])
203
203
  * // WHERE age >= 18
204
204
  * ```
@@ -207,8 +207,8 @@ export declare const expr: {
207
207
  /**
208
208
  * NULL 체크 (IS NULL)
209
209
  *
210
- * @param source - 체크할 컬럼 또는 표현식
211
- * @returns WHERE 조건 표현식
210
+ * @param source - 체크할 column 또는 expression
211
+ * @returns WHERE condition expression
212
212
  *
213
213
  * @example
214
214
  * ```typescript
@@ -218,14 +218,14 @@ export declare const expr: {
218
218
  */
219
219
  null<T extends ColumnPrimitive>(source: ExprUnit<T>): WhereExprUnit;
220
220
  /**
221
- * LIKE 패턴 매칭
221
+ * LIKE pattern 매칭
222
222
  *
223
223
  * `%`는 0개 이상의 문자, `_`는 단일 문자와 매칭.
224
- * 특수문자는 `\`로 이스케이프됨
224
+ * 특수문자는 `\`로 escape됨
225
225
  *
226
- * @param source - 검색할 컬럼 또는 표현식
227
- * @param pattern - 검색 패턴 (%, _ 와일드카드 사용 가능)
228
- * @returns WHERE 조건 표현식
226
+ * @param source - 검색할 column 또는 expression
227
+ * @param pattern - 검색 pattern (%, _ wildcard 사용 가능)
228
+ * @returns WHERE condition expression
229
229
  *
230
230
  * @example
231
231
  * ```typescript
@@ -233,19 +233,19 @@ export declare const expr: {
233
233
  * db.user().where((u) => [expr.like(u.name, "John%")])
234
234
  * // WHERE name LIKE 'John%' ESCAPE '\'
235
235
  *
236
- * // 포함 검색
236
+ * // include 검색
237
237
  * db.user().where((u) => [expr.like(u.email, "%@gmail.com")])
238
238
  * ```
239
239
  */
240
240
  like(source: ExprUnit<string | undefined>, pattern: ExprInput<string | undefined>): WhereExprUnit;
241
241
  /**
242
- * 정규식 패턴 매칭
242
+ * regular expression pattern 매칭
243
243
  *
244
- * DBMS별 정규식 문법 차이 주의 필요
244
+ * DBMS별 regular expression 문법 차이 주의 필요
245
245
  *
246
- * @param source - 검색할 컬럼 또는 표현식
247
- * @param pattern - 정규식 패턴
248
- * @returns WHERE 조건 표현식
246
+ * @param source - 검색할 column 또는 expression
247
+ * @param pattern - regular expression pattern
248
+ * @returns WHERE condition expression
249
249
  *
250
250
  * @example
251
251
  * ```typescript
@@ -255,11 +255,11 @@ export declare const expr: {
255
255
  */
256
256
  regexp(source: ExprUnit<string | undefined>, pattern: ExprInput<string | undefined>): WhereExprUnit;
257
257
  /**
258
- * IN 연산자 - 목록과 비교
258
+ * IN operator - Value 목록과 comparison
259
259
  *
260
- * @param source - 비교할 컬럼 또는 표현식
261
- * @param values - 비교할 목록
262
- * @returns WHERE 조건 표현식
260
+ * @param source - Column or expression to compare
261
+ * @param values - 비교할 value 목록
262
+ * @returns WHERE condition expression
263
263
  *
264
264
  * @example
265
265
  * ```typescript
@@ -269,14 +269,14 @@ export declare const expr: {
269
269
  */
270
270
  in<T extends ColumnPrimitive>(source: ExprUnit<T>, values: ExprInput<T>[]): WhereExprUnit;
271
271
  /**
272
- * IN (SELECT ...) - 서브쿼리 결과와 비교
272
+ * IN (SELECT ...) - Subquery 결과와 comparison
273
273
  *
274
- * 서브쿼리는 반드시 단일 컬럼만 SELECT해야 함
274
+ * Subquery는 반드시 단일 column만 SELECT해야 함
275
275
  *
276
- * @param source - 비교할 컬럼 또는 표현식
277
- * @param query - 단일 컬럼을 반환하는 Queryable
278
- * @returns WHERE 조건 표현식
279
- * @throws {Error} 서브쿼리가 단일 컬럼이 아닌 경우
276
+ * @param source - Column or expression to compare
277
+ * @param query - 단일 column을 반환하는 Queryable
278
+ * @returns WHERE condition expression
279
+ * @throws {Error} Subquery가 단일 column이 아닌 경우
280
280
  *
281
281
  * @example
282
282
  * ```typescript
@@ -293,12 +293,12 @@ export declare const expr: {
293
293
  */
294
294
  inQuery<T extends ColumnPrimitive, TData extends Record<string, T>>(source: ExprUnit<T>, query: Queryable<TData, any>): WhereExprUnit;
295
295
  /**
296
- * EXISTS (SELECT ...) - 서브쿼리 결과 존재 여부 확인
296
+ * EXISTS (SELECT ...) - Subquery result 존재 여부 확인
297
297
  *
298
- * 서브쿼리가 하나 이상의 행을 반환하면 true
298
+ * Subquery가 하나 이상의 행을 반환하면 true
299
299
  *
300
300
  * @param query - 존재 여부를 확인할 Queryable
301
- * @returns WHERE 조건 표현식
301
+ * @returns WHERE condition expression
302
302
  *
303
303
  * @example
304
304
  * ```typescript
@@ -313,10 +313,10 @@ export declare const expr: {
313
313
  */
314
314
  exists(query: Queryable<any, any>): WhereExprUnit;
315
315
  /**
316
- * NOT 연산자 - 조건 부정
316
+ * NOT operator - Condition 부정
317
317
  *
318
- * @param arg - 부정할 조건
319
- * @returns 부정된 WHERE 조건 표현식
318
+ * @param arg - 부정할 condition
319
+ * @returns 부정된 WHERE condition expression
320
320
  *
321
321
  * @example
322
322
  * ```typescript
@@ -326,12 +326,12 @@ export declare const expr: {
326
326
  */
327
327
  not(arg: WhereExprUnit): WhereExprUnit;
328
328
  /**
329
- * AND 연산자 - 모든 조건 충족
329
+ * AND operator - 모든 condition 충족
330
330
  *
331
- * 여러 조건을 AND로 결합. where() 메서드에 배열로 전달하면 자동으로 AND 적용됨
331
+ * 여러 조건을 AND로 결합. where() 메서드에 배열로 전달하면 automatic으로 AND applied
332
332
  *
333
- * @param conditions - AND로 결합할 조건 목록
334
- * @returns 결합된 WHERE 조건 표현식
333
+ * @param conditions - AND로 결합할 condition 목록
334
+ * @returns 결합된 WHERE condition expression
335
335
  *
336
336
  * @example
337
337
  * ```typescript
@@ -346,10 +346,10 @@ export declare const expr: {
346
346
  */
347
347
  and(conditions: WhereExprUnit[]): WhereExprUnit;
348
348
  /**
349
- * OR 연산자 - 하나 이상의 조건 충족
349
+ * OR operator - 하나 이상의 condition 충족
350
350
  *
351
- * @param conditions - OR로 결합할 조건 목록
352
- * @returns 결합된 WHERE 조건 표현식
351
+ * @param conditions - OR로 결합할 condition 목록
352
+ * @returns 결합된 WHERE condition expression
353
353
  *
354
354
  * @example
355
355
  * ```typescript
@@ -366,10 +366,10 @@ export declare const expr: {
366
366
  /**
367
367
  * 문자열 연결 (CONCAT)
368
368
  *
369
- * NULL 값은 빈 문자열로 처리됨 (DBMS별 자동 변환)
369
+ * NULL 값은 빈 문자열로 processing됨 (DBMS별 automatic Transform)
370
370
  *
371
371
  * @param args - 연결할 문자열들
372
- * @returns 연결된 문자열 표현식
372
+ * @returns 연결된 문자열 expression
373
373
  *
374
374
  * @example
375
375
  * ```typescript
@@ -383,9 +383,9 @@ export declare const expr: {
383
383
  /**
384
384
  * 문자열 왼쪽에서 지정 길이만큼 추출 (LEFT)
385
385
  *
386
- * @param source - 원본 문자열
386
+ * @param source - original string
387
387
  * @param length - 추출할 문자 수
388
- * @returns 추출된 문자열 표현식
388
+ * @returns 추출된 문자열 expression
389
389
  *
390
390
  * @example
391
391
  * ```typescript
@@ -399,9 +399,9 @@ export declare const expr: {
399
399
  /**
400
400
  * 문자열 오른쪽에서 지정 길이만큼 추출 (RIGHT)
401
401
  *
402
- * @param source - 원본 문자열
402
+ * @param source - original string
403
403
  * @param length - 추출할 문자 수
404
- * @returns 추출된 문자열 표현식
404
+ * @returns 추출된 문자열 expression
405
405
  *
406
406
  * @example
407
407
  * ```typescript
@@ -413,10 +413,10 @@ export declare const expr: {
413
413
  */
414
414
  right<T extends string | undefined>(source: ExprUnit<T>, length: ExprInput<number>): ExprUnit<T>;
415
415
  /**
416
- * 문자열 양쪽 공백 제거 (TRIM)
416
+ * 문자열 양쪽 공백 Remove (TRIM)
417
417
  *
418
- * @param source - 원본 문자열
419
- * @returns 공백이 제거된 문자열 표현식
418
+ * @param source - original string
419
+ * @returns 공백이 제거된 문자열 expression
420
420
  *
421
421
  * @example
422
422
  * ```typescript
@@ -430,12 +430,12 @@ export declare const expr: {
430
430
  /**
431
431
  * 문자열 왼쪽 패딩 (LPAD)
432
432
  *
433
- * 지정 길이가 될 때까지 왼쪽에 fillString 반복 추가
433
+ * 지정 길이가 될 때까지 왼쪽에 fillString loop Add
434
434
  *
435
- * @param source - 원본 문자열
435
+ * @param source - original string
436
436
  * @param length - 목표 길이
437
437
  * @param fillString - 패딩에 사용할 문자열
438
- * @returns 패딩된 문자열 표현식
438
+ * @returns 패딩된 문자열 expression
439
439
  *
440
440
  * @example
441
441
  * ```typescript
@@ -443,17 +443,17 @@ export declare const expr: {
443
443
  * orderNo: expr.padStart(expr.cast(o.id, { type: "varchar", length: 10 }), 8, "0"),
444
444
  * }))
445
445
  * // SELECT LPAD(CAST(id AS VARCHAR(10)), 8, '0') AS orderNo
446
- * // 결과: "00000123"
446
+ * // Result: "00000123"
447
447
  * ```
448
448
  */
449
449
  padStart<T extends string | undefined>(source: ExprUnit<T>, length: ExprInput<number>, fillString: ExprInput<string>): ExprUnit<T>;
450
450
  /**
451
451
  * 문자열 치환 (REPLACE)
452
452
  *
453
- * @param source - 원본 문자열
453
+ * @param source - original string
454
454
  * @param from - 찾을 문자열
455
455
  * @param to - 대체할 문자열
456
- * @returns 치환된 문자열 표현식
456
+ * @returns 치환된 문자열 expression
457
457
  *
458
458
  * @example
459
459
  * ```typescript
@@ -465,10 +465,10 @@ export declare const expr: {
465
465
  */
466
466
  replace<T extends string | undefined>(source: ExprUnit<T>, from: ExprInput<string>, to: ExprInput<string>): ExprUnit<T>;
467
467
  /**
468
- * 문자열 대문자 변환 (UPPER)
468
+ * 문자열 대문자 Transform (UPPER)
469
469
  *
470
- * @param source - 원본 문자열
471
- * @returns 대문자로 변환된 문자열 표현식
470
+ * @param source - original string
471
+ * @returns 대문자로 Transform된 문자열 expression
472
472
  *
473
473
  * @example
474
474
  * ```typescript
@@ -480,10 +480,10 @@ export declare const expr: {
480
480
  */
481
481
  upper<T extends string | undefined>(source: ExprUnit<T>): ExprUnit<T>;
482
482
  /**
483
- * 문자열 소문자 변환 (LOWER)
483
+ * 문자열 소문자 Transform (LOWER)
484
484
  *
485
- * @param source - 원본 문자열
486
- * @returns 소문자로 변환된 문자열 표현식
485
+ * @param source - original string
486
+ * @returns 소문자로 Transform된 문자열 expression
487
487
  *
488
488
  * @example
489
489
  * ```typescript
@@ -497,7 +497,7 @@ export declare const expr: {
497
497
  /**
498
498
  * 문자열 길이 (문자 수)
499
499
  *
500
- * @param source - 원본 문자열
500
+ * @param source - original string
501
501
  * @returns 문자 수
502
502
  *
503
503
  * @example
@@ -514,7 +514,7 @@ export declare const expr: {
514
514
  *
515
515
  * UTF-8 환경에서 한글은 3바이트
516
516
  *
517
- * @param source - 원본 문자열
517
+ * @param source - original string
518
518
  * @returns 바이트 수
519
519
  *
520
520
  * @example
@@ -531,15 +531,15 @@ export declare const expr: {
531
531
  *
532
532
  * SQL 표준에 따라 1-based index 사용
533
533
  *
534
- * @param source - 원본 문자열
535
- * @param start - 시작 위치 (1부터 시작)
534
+ * @param source - original string
535
+ * @param start - start 위치 (1부터 start)
536
536
  * @param length - 추출할 길이 (생략 시 끝까지)
537
- * @returns 추출된 문자열 표현식
537
+ * @returns 추출된 문자열 expression
538
538
  *
539
539
  * @example
540
540
  * ```typescript
541
541
  * db.user().select((u) => ({
542
- * // "Hello World"에서 인덱스 1부터 5글자: "Hello"
542
+ * // "Hello World"에서 Index 1부터 5글자: "Hello"
543
543
  * prefix: expr.substring(u.name, 1, 5),
544
544
  * }))
545
545
  * // SELECT SUBSTRING(name, 1, 5) AS prefix
@@ -549,11 +549,11 @@ export declare const expr: {
549
549
  /**
550
550
  * 문자열 내 위치 찾기 (LOCATE/CHARINDEX)
551
551
  *
552
- * 1-based index 반환, 없으면 0 반환
552
+ * 1-based index return, 없으면 0 return
553
553
  *
554
554
  * @param source - 검색할 문자열
555
555
  * @param search - 찾을 문자열
556
- * @returns 위치 (1부터 시작, 없으면 0)
556
+ * @returns 위치 (1부터 start, 없으면 0)
557
557
  *
558
558
  * @example
559
559
  * ```typescript
@@ -568,8 +568,8 @@ export declare const expr: {
568
568
  /**
569
569
  * 절대값 (ABS)
570
570
  *
571
- * @param source - 원본 숫자
572
- * @returns 절대값 표현식
571
+ * @param source - 원본 Number
572
+ * @returns 절대값 expression
573
573
  *
574
574
  * @example
575
575
  * ```typescript
@@ -583,9 +583,9 @@ export declare const expr: {
583
583
  /**
584
584
  * 반올림 (ROUND)
585
585
  *
586
- * @param source - 원본 숫자
586
+ * @param source - 원본 Number
587
587
  * @param digits - 소수점 이하 자릿수
588
- * @returns 반올림된 숫자 표현식
588
+ * @returns 반올림된 Number expression
589
589
  *
590
590
  * @example
591
591
  * ```typescript
@@ -600,8 +600,8 @@ export declare const expr: {
600
600
  /**
601
601
  * 올림 (CEILING)
602
602
  *
603
- * @param source - 원본 숫자
604
- * @returns 올림된 숫자 표현식
603
+ * @param source - 원본 Number
604
+ * @returns 올림된 Number expression
605
605
  *
606
606
  * @example
607
607
  * ```typescript
@@ -616,8 +616,8 @@ export declare const expr: {
616
616
  /**
617
617
  * 버림 (FLOOR)
618
618
  *
619
- * @param source - 원본 숫자
620
- * @returns 버림된 숫자 표현식
619
+ * @param source - 원본 Number
620
+ * @returns 버림된 Number expression
621
621
  *
622
622
  * @example
623
623
  * ```typescript
@@ -632,8 +632,8 @@ export declare const expr: {
632
632
  /**
633
633
  * 연도 추출 (YEAR)
634
634
  *
635
- * @param source - DateTime 또는 DateOnly 표현식
636
- * @returns 연도 (4자리 숫자)
635
+ * @param source - DateTime 또는 DateOnly expression
636
+ * @returns 연도 (4자리 Number)
637
637
  *
638
638
  * @example
639
639
  * ```typescript
@@ -647,7 +647,7 @@ export declare const expr: {
647
647
  /**
648
648
  * 월 추출 (MONTH)
649
649
  *
650
- * @param source - DateTime 또는 DateOnly 표현식
650
+ * @param source - DateTime 또는 DateOnly expression
651
651
  * @returns 월 (1~12)
652
652
  *
653
653
  * @example
@@ -662,7 +662,7 @@ export declare const expr: {
662
662
  /**
663
663
  * 일 추출 (DAY)
664
664
  *
665
- * @param source - DateTime 또는 DateOnly 표현식
665
+ * @param source - DateTime 또는 DateOnly expression
666
666
  * @returns 일 (1~31)
667
667
  *
668
668
  * @example
@@ -677,7 +677,7 @@ export declare const expr: {
677
677
  /**
678
678
  * 시 추출 (HOUR)
679
679
  *
680
- * @param source - DateTime 또는 Time 표현식
680
+ * @param source - DateTime 또는 Time expression
681
681
  * @returns 시 (0~23)
682
682
  *
683
683
  * @example
@@ -692,7 +692,7 @@ export declare const expr: {
692
692
  /**
693
693
  * 분 추출 (MINUTE)
694
694
  *
695
- * @param source - DateTime 또는 Time 표현식
695
+ * @param source - DateTime 또는 Time expression
696
696
  * @returns 분 (0~59)
697
697
  *
698
698
  * @example
@@ -707,7 +707,7 @@ export declare const expr: {
707
707
  /**
708
708
  * 초 추출 (SECOND)
709
709
  *
710
- * @param source - DateTime 또는 Time 표현식
710
+ * @param source - DateTime 또는 Time expression
711
711
  * @returns 초 (0~59)
712
712
  *
713
713
  * @example
@@ -722,9 +722,9 @@ export declare const expr: {
722
722
  /**
723
723
  * ISO 주차 추출
724
724
  *
725
- * ISO 8601 기준 주차 (월요일 시작, 1~53)
725
+ * ISO 8601 기준 주차 (월요일 start, 1~53)
726
726
  *
727
- * @param source - DateOnly 표현식
727
+ * @param source - DateOnly expression
728
728
  * @returns ISO 주차 번호
729
729
  *
730
730
  * @example
@@ -739,10 +739,10 @@ export declare const expr: {
739
739
  /**
740
740
  * ISO 주 시작일 (월요일)
741
741
  *
742
- * 해당 날짜가 속한 주의 월요일 반환
742
+ * 해당 Date가 속한 주의 월요일 return
743
743
  *
744
- * @param source - DateOnly 표현식
745
- * @returns 주의 시작 날짜 (월요일)
744
+ * @param source - DateOnly expression
745
+ * @returns 주의 start Date (월요일)
746
746
  *
747
747
  * @example
748
748
  * ```typescript
@@ -756,9 +756,9 @@ export declare const expr: {
756
756
  /**
757
757
  * ISO 연월 (해당 월의 1일)
758
758
  *
759
- * 해당 날짜의 월 첫째 날 반환
759
+ * 해당 Date의 월 첫째 날 return
760
760
  *
761
- * @param source - DateOnly 표현식
761
+ * @param source - DateOnly expression
762
762
  * @returns 월의 첫째 날
763
763
  *
764
764
  * @example
@@ -771,12 +771,12 @@ export declare const expr: {
771
771
  */
772
772
  isoYearMonth<T extends DateOnly | undefined>(source: ExprUnit<T>): ExprUnit<T>;
773
773
  /**
774
- * 날짜 차이 계산 (DATEDIFF)
774
+ * Date 차이 계산 (DATEDIFF)
775
775
  *
776
776
  * @param separator - 단위 ("year", "month", "day", "hour", "minute", "second")
777
- * @param from - 시작 날짜
778
- * @param to - 끝 날짜
779
- * @returns 차이 (to - from)
777
+ * @param from - start Date
778
+ * @param to - 끝 Date
779
+ * @returns 차이 value (to - from)
780
780
  *
781
781
  * @example
782
782
  * ```typescript
@@ -788,12 +788,12 @@ export declare const expr: {
788
788
  */
789
789
  dateDiff<T extends DateTime | DateOnly | Time | undefined>(separator: DateSeparator, from: ExprInput<T>, to: ExprInput<T>): ExprUnit<T extends undefined ? undefined : number>;
790
790
  /**
791
- * 날짜 더하기 (DATEADD)
791
+ * Date 더하기 (DATEADD)
792
792
  *
793
793
  * @param separator - 단위 ("year", "month", "day", "hour", "minute", "second")
794
- * @param source - 원본 날짜
795
- * @param value - 더할 (음수 가능)
796
- * @returns 계산된 날짜
794
+ * @param source - 원본 Date
795
+ * @param value - 더할 value (음수 가능)
796
+ * @returns 계산된 Date
797
797
  *
798
798
  * @example
799
799
  * ```typescript
@@ -805,13 +805,13 @@ export declare const expr: {
805
805
  */
806
806
  dateAdd<T extends DateTime | DateOnly | Time | undefined>(separator: DateSeparator, source: ExprUnit<T>, value: ExprInput<number>): ExprUnit<T>;
807
807
  /**
808
- * 날짜 포맷 (DATE_FORMAT)
808
+ * Date 포맷 (DATE_FORMAT)
809
809
  *
810
810
  * DBMS별로 포맷 문자열 규칙이 다를 수 있음
811
811
  *
812
- * @param source - 날짜 표현식
812
+ * @param source - Date expression
813
813
  * @param format - 포맷 문자열 (예: "%Y-%m-%d")
814
- * @returns 포맷된 문자열 표현식
814
+ * @returns 포맷된 문자열 expression
815
815
  *
816
816
  * @example
817
817
  * ```typescript
@@ -826,10 +826,10 @@ export declare const expr: {
826
826
  /**
827
827
  * NULL 대체 (COALESCE/IFNULL)
828
828
  *
829
- * 첫 번째 non-null 값을 반환. 마지막 인자가 non-nullable이면 결과도 non-nullable
829
+ * 첫 번째 non-null 값을 return. 마지막 인자가 non-nullable이면 결과도 non-nullable
830
830
  *
831
- * @param args - 검사할 값들 (마지막은 기본값)
832
- * @returns 첫 번째 non-null
831
+ * @param args - Inspect할 값들 (마지막은 Default value)
832
+ * @returns 첫 번째 non-null value
833
833
  *
834
834
  * @example
835
835
  * ```typescript
@@ -841,18 +841,18 @@ export declare const expr: {
841
841
  */
842
842
  ifNull: typeof ifNull;
843
843
  /**
844
- * 특정 값이면 NULL 반환 (NULLIF)
844
+ * 특정 값이면 NULL return (NULLIF)
845
845
  *
846
- * source === value 이면 NULL 반환, 아니면 source 반환
846
+ * source === value 이면 NULL return, 아니면 source return
847
847
  *
848
- * @param source - 원본
849
- * @param value - 비교할
850
- * @returns NULL 또는 원본
848
+ * @param source - 원본 value
849
+ * @param value - 비교할 value
850
+ * @returns NULL 또는 원본 value
851
851
  *
852
852
  * @example
853
853
  * ```typescript
854
854
  * db.user().select((u) => ({
855
- * // 빈 문자열을 NULL로 변환
855
+ * // 빈 문자열을 NULL로 Transform
856
856
  * bio: expr.nullIf(u.bio, ""),
857
857
  * }))
858
858
  * // SELECT NULLIF(bio, '') AS bio
@@ -860,12 +860,12 @@ export declare const expr: {
860
860
  */
861
861
  nullIf<T extends ColumnPrimitive>(source: ExprUnit<T>, value: ExprInput<T>): ExprUnit<T | undefined>;
862
862
  /**
863
- * WHERE 표현식을 boolean으로 변환
863
+ * WHERE 표현식을 boolean으로 Transform
864
864
  *
865
- * SELECT 절에서 조건 결과를 boolean 컬럼으로 사용할 때 사용
865
+ * SELECT 절에서 condition 결과를 boolean column으로 사용할 때 사용
866
866
  *
867
- * @param condition - 변환할 조건
868
- * @returns boolean 표현식
867
+ * @param condition - Transform할 condition
868
+ * @returns boolean expression
869
869
  *
870
870
  * @example
871
871
  * ```typescript
@@ -877,11 +877,11 @@ export declare const expr: {
877
877
  */
878
878
  is(condition: WhereExprUnit): ExprUnit<boolean>;
879
879
  /**
880
- * CASE WHEN 표현식 빌더
880
+ * CASE WHEN expression builder
881
881
  *
882
- * 체이닝 방식으로 조건 분기를 구성
882
+ * 체이닝 방식으로 condition 분기를 구성
883
883
  *
884
- * @returns SwitchExprBuilder 인스턴스
884
+ * @returns SwitchExprBuilder instance
885
885
  *
886
886
  * @example
887
887
  * ```typescript
@@ -897,12 +897,12 @@ export declare const expr: {
897
897
  */
898
898
  switch<T extends ColumnPrimitive>(): SwitchExprBuilder<T>;
899
899
  /**
900
- * 단순 IF 조건 (삼항 연산자)
900
+ * 단순 IF condition (삼항 operator)
901
901
  *
902
- * @param condition - 조건
903
- * @param then - 조건이 참일 때
904
- * @param else_ - 조건이 거짓일 때
905
- * @returns 조건부 표현식
902
+ * @param condition - Condition
903
+ * @param then - Condition이 참일 때 value
904
+ * @param else_ - Condition이 거짓일 때 value
905
+ * @returns 조건부 value expression
906
906
  *
907
907
  * @example
908
908
  * ```typescript
@@ -914,18 +914,18 @@ export declare const expr: {
914
914
  */
915
915
  if<T extends ColumnPrimitive>(condition: WhereExprUnit, then: ExprInput<T>, else_: ExprInput<T>): ExprUnit<T>;
916
916
  /**
917
- * 수 카운트 (COUNT)
917
+ * row 수 카운트 (COUNT)
918
918
  *
919
- * @param arg - 카운트할 컬럼 (생략 시 전체 수)
920
- * @param distinct - true면 중복 제거
921
- * @returns
919
+ * @param arg - 카운트할 column (생략 시 전체 row 수)
920
+ * @param distinct - true면 중복 Remove
921
+ * @returns row
922
922
  *
923
923
  * @example
924
924
  * ```typescript
925
- * // 전체
925
+ * // 전체 row
926
926
  * db.user().select(() => ({ total: expr.count() }))
927
927
  *
928
- * // 중복 제거 카운트
928
+ * // 중복 Remove 카운트
929
929
  * db.order().select((o) => ({
930
930
  * uniqueCustomers: expr.count(o.customerId, true),
931
931
  * }))
@@ -935,9 +935,9 @@ export declare const expr: {
935
935
  /**
936
936
  * 합계 (SUM)
937
937
  *
938
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL 반환
938
+ * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
939
939
  *
940
- * @param arg - 합계를 구할 숫자 컬럼
940
+ * @param arg - 합계를 구할 Number column
941
941
  * @returns 합계 (또는 NULL)
942
942
  *
943
943
  * @example
@@ -952,9 +952,9 @@ export declare const expr: {
952
952
  /**
953
953
  * 평균 (AVG)
954
954
  *
955
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL 반환
955
+ * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
956
956
  *
957
- * @param arg - 평균을 구할 숫자 컬럼
957
+ * @param arg - 평균을 구할 Number column
958
958
  * @returns 평균 (또는 NULL)
959
959
  *
960
960
  * @example
@@ -969,9 +969,9 @@ export declare const expr: {
969
969
  /**
970
970
  * 최대값 (MAX)
971
971
  *
972
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL 반환
972
+ * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
973
973
  *
974
- * @param arg - 최대값을 구할 컬럼
974
+ * @param arg - 최대값을 구할 column
975
975
  * @returns 최대값 (또는 NULL)
976
976
  *
977
977
  * @example
@@ -986,9 +986,9 @@ export declare const expr: {
986
986
  /**
987
987
  * 최소값 (MIN)
988
988
  *
989
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL 반환
989
+ * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
990
990
  *
991
- * @param arg - 최소값을 구할 컬럼
991
+ * @param arg - 최소값을 구할 column
992
992
  * @returns 최소값 (또는 NULL)
993
993
  *
994
994
  * @example
@@ -1001,7 +1001,7 @@ export declare const expr: {
1001
1001
  */
1002
1002
  min<T extends ColumnPrimitive>(arg: ExprUnit<T>): ExprUnit<T | undefined>;
1003
1003
  /**
1004
- * 여러 중 최대값 (GREATEST)
1004
+ * 여러 value 중 최대값 (GREATEST)
1005
1005
  *
1006
1006
  * @param args - 비교할 값들
1007
1007
  * @returns 최대값
@@ -1016,7 +1016,7 @@ export declare const expr: {
1016
1016
  */
1017
1017
  greatest<T extends ColumnPrimitive>(...args: ExprInput<T>[]): ExprUnit<T>;
1018
1018
  /**
1019
- * 여러 중 최소값 (LEAST)
1019
+ * 여러 value 중 최소값 (LEAST)
1020
1020
  *
1021
1021
  * @param args - 비교할 값들
1022
1022
  * @returns 최소값
@@ -1031,9 +1031,9 @@ export declare const expr: {
1031
1031
  */
1032
1032
  least<T extends ColumnPrimitive>(...args: ExprInput<T>[]): ExprUnit<T>;
1033
1033
  /**
1034
- * 번호 (ROW_NUMBER 없이 전체 행에 대한 순번)
1034
+ * row 번호 (ROW_NUMBER 없이 전체 행에 대한 순번)
1035
1035
  *
1036
- * @returns 번호 (1부터 시작)
1036
+ * @returns row 번호 (1부터 start)
1037
1037
  *
1038
1038
  * @example
1039
1039
  * ```typescript
@@ -1045,25 +1045,25 @@ export declare const expr: {
1045
1045
  */
1046
1046
  rowNum(): ExprUnit<number>;
1047
1047
  /**
1048
- * 난수 생성 (RAND/RANDOM)
1048
+ * 난수 Generate (RAND/RANDOM)
1049
1049
  *
1050
- * 0~1 사이의 난수 반환. ORDER BY에서 랜덤 정렬용으로 주로 사용
1050
+ * 0~1 사이의 난수 return. ORDER BY에서 랜덤 정렬용으로 주로 사용
1051
1051
  *
1052
1052
  * @returns 0~1 사이의 난수
1053
1053
  *
1054
1054
  * @example
1055
1055
  * ```typescript
1056
- * // 랜덤 정렬
1056
+ * // 랜덤 sorting
1057
1057
  * db.user().orderBy(() => expr.random()).limit(10)
1058
1058
  * ```
1059
1059
  */
1060
1060
  random(): ExprUnit<number>;
1061
1061
  /**
1062
- * 타입 변환 (CAST)
1062
+ * type transformation (CAST)
1063
1063
  *
1064
- * @param source - 변환할 표현식
1065
- * @param targetType - 대상 데이터 타입
1066
- * @returns 변환된 표현식
1064
+ * @param source - Transform할 expression
1065
+ * @param targetType - 대상 data type
1066
+ * @returns Transform된 expression
1067
1067
  *
1068
1068
  * @example
1069
1069
  * ```typescript
@@ -1075,13 +1075,13 @@ export declare const expr: {
1075
1075
  */
1076
1076
  cast<T extends ColumnPrimitive, TDataType extends DataType>(source: ExprUnit<T>, targetType: TDataType): ExprUnit<T extends undefined ? undefined : InferColumnPrimitiveFromDataType<TDataType>>;
1077
1077
  /**
1078
- * 스칼라 서브쿼리 - SELECT 절에서 단일 반환 서브쿼리
1078
+ * 스칼라 Subquery - SELECT 절에서 단일 value return Subquery
1079
1079
  *
1080
- * 서브쿼리는 반드시 단일 행, 단일 컬럼을 반환해야 함
1080
+ * Subquery는 반드시 단일 row, 단일 column을 반환해야 함
1081
1081
  *
1082
- * @param dataType - 반환될 값의 데이터 타입
1082
+ * @param dataType - Data type of the returned value
1083
1083
  * @param queryable - 스칼라 값을 반환하는 Queryable
1084
- * @returns 서브쿼리 결과 표현식
1084
+ * @returns Subquery result expression
1085
1085
  *
1086
1086
  * @example
1087
1087
  * ```typescript
@@ -1101,12 +1101,12 @@ export declare const expr: {
1101
1101
  getSelectQueryDef(): SelectQueryDef;
1102
1102
  }): ExprUnit<ColumnPrimitiveMap[TStr] | undefined>;
1103
1103
  /**
1104
- * ROW_NUMBER() - 파티션 내 번호
1104
+ * ROW_NUMBER() - 파티션 내 row 번호
1105
1105
  *
1106
- * 각 파티션 내에서 1부터 시작하는 순차 번호 부여
1106
+ * 각 파티션 내에서 1부터 시작하는 sequential 번호 부여
1107
1107
  *
1108
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1109
- * @returns 번호 (1부터 시작)
1108
+ * @param spec - Window spec (partitionBy, orderBy)
1109
+ * @returns row 번호 (1부터 start)
1110
1110
  *
1111
1111
  * @example
1112
1112
  * ```typescript
@@ -1124,7 +1124,7 @@ export declare const expr: {
1124
1124
  /**
1125
1125
  * RANK() - 파티션 내 순위 (동점 시 같은 순위, 다음 순위 건너뜀)
1126
1126
  *
1127
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1127
+ * @param spec - Window spec (partitionBy, orderBy)
1128
1128
  * @returns 순위 (동점 후 건너뜀: 1, 1, 3)
1129
1129
  *
1130
1130
  * @example
@@ -1141,7 +1141,7 @@ export declare const expr: {
1141
1141
  /**
1142
1142
  * DENSE_RANK() - 파티션 내 밀집 순위 (동점 시 같은 순위, 다음 순위 유지)
1143
1143
  *
1144
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1144
+ * @param spec - Window spec (partitionBy, orderBy)
1145
1145
  * @returns 밀집 순위 (동점 후 연속: 1, 1, 2)
1146
1146
  *
1147
1147
  * @example
@@ -1156,15 +1156,15 @@ export declare const expr: {
1156
1156
  */
1157
1157
  denseRank(spec: WinSpecInput): ExprUnit<number>;
1158
1158
  /**
1159
- * NTILE(n) - 파티션을 n개 그룹으로 분할
1159
+ * NTILE(n) - 파티션을 n개 그룹으로 split
1160
1160
  *
1161
1161
  * @param n - 분할할 그룹 수
1162
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1162
+ * @param spec - Window spec (partitionBy, orderBy)
1163
1163
  * @returns 그룹 번호 (1 ~ n)
1164
1164
  *
1165
1165
  * @example
1166
1166
  * ```typescript
1167
- * // 상위 25%를 찾기 위한 사분위 분할
1167
+ * // 상위 25%를 찾기 위한 사분위 split
1168
1168
  * db.user().select((u) => ({
1169
1169
  * name: u.name,
1170
1170
  * quartile: expr.ntile(4, {
@@ -1175,12 +1175,12 @@ export declare const expr: {
1175
1175
  */
1176
1176
  ntile(n: number, spec: WinSpecInput): ExprUnit<number>;
1177
1177
  /**
1178
- * LAG() - 이전 행의 참조
1178
+ * LAG() - 이전 행의 value 참조
1179
1179
  *
1180
- * @param column - 참조할 컬럼
1181
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1182
- * @param options - offset (기본 1), default (이전 행이 없을 때 기본값)
1183
- * @returns 이전 행의 (또는 기본값/NULL)
1180
+ * @param column - column to reference
1181
+ * @param spec - Window spec (partitionBy, orderBy)
1182
+ * @param options - offset (Basic 1), default (이전 행이 없을 때 Default value)
1183
+ * @returns 이전 행의 value (또는 Default value/NULL)
1184
1184
  *
1185
1185
  * @example
1186
1186
  * ```typescript
@@ -1199,12 +1199,12 @@ export declare const expr: {
1199
1199
  default?: ExprInput<T>;
1200
1200
  }): ExprUnit<T | undefined>;
1201
1201
  /**
1202
- * LEAD() - 다음 행의 참조
1202
+ * LEAD() - 다음 행의 value 참조
1203
1203
  *
1204
- * @param column - 참조할 컬럼
1205
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1206
- * @param options - offset (기본 1), default (다음 행이 없을 때 기본값)
1207
- * @returns 다음 행의 (또는 기본값/NULL)
1204
+ * @param column - column to reference
1205
+ * @param spec - Window spec (partitionBy, orderBy)
1206
+ * @param options - offset (Basic 1), default (다음 행이 없을 때 Default value)
1207
+ * @returns 다음 행의 value (또는 Default value/NULL)
1208
1208
  *
1209
1209
  * @example
1210
1210
  * ```typescript
@@ -1223,11 +1223,11 @@ export declare const expr: {
1223
1223
  default?: ExprInput<T>;
1224
1224
  }): ExprUnit<T | undefined>;
1225
1225
  /**
1226
- * FIRST_VALUE() - 파티션/프레임의 첫 번째
1226
+ * FIRST_VALUE() - 파티션/프레임의 첫 번째 value
1227
1227
  *
1228
- * @param column - 참조할 컬럼
1229
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1230
- * @returns 첫 번째
1228
+ * @param column - column to reference
1229
+ * @param spec - Window spec (partitionBy, orderBy)
1230
+ * @returns 첫 번째 value
1231
1231
  *
1232
1232
  * @example
1233
1233
  * ```typescript
@@ -1242,11 +1242,11 @@ export declare const expr: {
1242
1242
  */
1243
1243
  firstValue<T extends ColumnPrimitive>(column: ExprUnit<T>, spec: WinSpecInput): ExprUnit<T | undefined>;
1244
1244
  /**
1245
- * LAST_VALUE() - 파티션/프레임의 마지막
1245
+ * LAST_VALUE() - 파티션/프레임의 마지막 value
1246
1246
  *
1247
- * @param column - 참조할 컬럼
1248
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1249
- * @returns 마지막
1247
+ * @param column - column to reference
1248
+ * @param spec - Window spec (partitionBy, orderBy)
1249
+ * @returns 마지막 value
1250
1250
  *
1251
1251
  * @example
1252
1252
  * ```typescript
@@ -1261,11 +1261,11 @@ export declare const expr: {
1261
1261
  */
1262
1262
  lastValue<T extends ColumnPrimitive>(column: ExprUnit<T>, spec: WinSpecInput): ExprUnit<T | undefined>;
1263
1263
  /**
1264
- * SUM() OVER - 윈도우 합계
1264
+ * SUM() OVER - Window 합계
1265
1265
  *
1266
- * @param column - 합계를 구할 컬럼
1267
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1268
- * @returns 윈도우 내 합계
1266
+ * @param column - 합계를 구할 column
1267
+ * @param spec - Window spec (partitionBy, orderBy)
1268
+ * @returns Window 내 합계
1269
1269
  *
1270
1270
  * @example
1271
1271
  * ```typescript
@@ -1281,15 +1281,15 @@ export declare const expr: {
1281
1281
  */
1282
1282
  sumOver(column: ExprUnit<number | undefined>, spec: WinSpecInput): ExprUnit<number | undefined>;
1283
1283
  /**
1284
- * AVG() OVER - 윈도우 평균
1284
+ * AVG() OVER - Window 평균
1285
1285
  *
1286
- * @param column - 평균을 구할 컬럼
1287
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1288
- * @returns 윈도우 내 평균
1286
+ * @param column - 평균을 구할 column
1287
+ * @param spec - Window spec (partitionBy, orderBy)
1288
+ * @returns Window 내 평균
1289
1289
  *
1290
1290
  * @example
1291
1291
  * ```typescript
1292
- * // 이동 평균
1292
+ * // move 평균
1293
1293
  * db.stock().select((s) => ({
1294
1294
  * ...s,
1295
1295
  * movingAvg: expr.avgOver(s.price, {
@@ -1301,11 +1301,11 @@ export declare const expr: {
1301
1301
  */
1302
1302
  avgOver(column: ExprUnit<number | undefined>, spec: WinSpecInput): ExprUnit<number | undefined>;
1303
1303
  /**
1304
- * COUNT() OVER - 윈도우 카운트
1304
+ * COUNT() OVER - Window 카운트
1305
1305
  *
1306
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1307
- * @param column - 카운트할 컬럼 (생략 시 전체 수)
1308
- * @returns 윈도우
1306
+ * @param spec - Window spec (partitionBy, orderBy)
1307
+ * @param column - 카운트할 column (생략 시 전체 row 수)
1308
+ * @returns Windowrow
1309
1309
  *
1310
1310
  * @example
1311
1311
  * ```typescript
@@ -1319,11 +1319,11 @@ export declare const expr: {
1319
1319
  */
1320
1320
  countOver(spec: WinSpecInput, column?: ExprUnit<ColumnPrimitive>): ExprUnit<number>;
1321
1321
  /**
1322
- * MIN() OVER - 윈도우 최소값
1322
+ * MIN() OVER - Window 최소값
1323
1323
  *
1324
- * @param column - 최소값을 구할 컬럼
1325
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1326
- * @returns 윈도우 내 최소값
1324
+ * @param column - 최소값을 구할 column
1325
+ * @param spec - Window spec (partitionBy, orderBy)
1326
+ * @returns Window 내 최소값
1327
1327
  *
1328
1328
  * @example
1329
1329
  * ```typescript
@@ -1337,11 +1337,11 @@ export declare const expr: {
1337
1337
  */
1338
1338
  minOver<T extends ColumnPrimitive>(column: ExprUnit<T>, spec: WinSpecInput): ExprUnit<T | undefined>;
1339
1339
  /**
1340
- * MAX() OVER - 윈도우 최대값
1340
+ * MAX() OVER - Window 최대값
1341
1341
  *
1342
- * @param column - 최대값을 구할 컬럼
1343
- * @param spec - 윈도우 스펙 (partitionBy, orderBy)
1344
- * @returns 윈도우 내 최대값
1342
+ * @param column - 최대값을 구할 column
1343
+ * @param spec - Window spec (partitionBy, orderBy)
1344
+ * @returns Window 내 최대값
1345
1345
  *
1346
1346
  * @example
1347
1347
  * ```typescript
@@ -1355,9 +1355,9 @@ export declare const expr: {
1355
1355
  */
1356
1356
  maxOver<T extends ColumnPrimitive>(column: ExprUnit<T>, spec: WinSpecInput): ExprUnit<T | undefined>;
1357
1357
  /**
1358
- * ExprInput을 Expr로 변환 (내부용)
1358
+ * ExprInput을 Expr로 Transform (내부용)
1359
1359
  *
1360
- * @param value - 변환할
1360
+ * @param value - Transform할 value
1361
1361
  * @returns Expr JSON AST
1362
1362
  */
1363
1363
  toExpr(value: ExprInput<ColumnPrimitive>): Expr;