@simplysm/orm-common 14.0.1 → 14.0.5

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 (59) hide show
  1. package/README.md +163 -0
  2. package/dist/exec/queryable.js +18 -18
  3. package/dist/exec/queryable.js.map +1 -1
  4. package/dist/expr/expr.d.ts +102 -102
  5. package/dist/expr/expr.js +105 -105
  6. package/dist/expr/expr.js.map +1 -1
  7. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts +1 -1
  8. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts.map +1 -1
  9. package/dist/query-builder/mssql/mssql-expr-renderer.js +17 -17
  10. package/dist/query-builder/mssql/mssql-expr-renderer.js.map +1 -1
  11. package/dist/query-builder/mssql/mssql-query-builder.d.ts +2 -2
  12. package/dist/query-builder/mssql/mssql-query-builder.d.ts.map +1 -1
  13. package/dist/query-builder/mssql/mssql-query-builder.js +26 -26
  14. package/dist/query-builder/mssql/mssql-query-builder.js.map +1 -1
  15. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts +1 -1
  16. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts.map +1 -1
  17. package/dist/query-builder/mysql/mysql-expr-renderer.js +14 -14
  18. package/dist/query-builder/mysql/mysql-expr-renderer.js.map +1 -1
  19. package/dist/query-builder/mysql/mysql-query-builder.d.ts +10 -10
  20. package/dist/query-builder/mysql/mysql-query-builder.d.ts.map +1 -1
  21. package/dist/query-builder/mysql/mysql-query-builder.js +67 -67
  22. package/dist/query-builder/mysql/mysql-query-builder.js.map +1 -1
  23. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts +1 -1
  24. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts.map +1 -1
  25. package/dist/query-builder/postgresql/postgresql-expr-renderer.js +13 -13
  26. package/dist/query-builder/postgresql/postgresql-expr-renderer.js.map +1 -1
  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 +47 -47
  30. package/dist/query-builder/postgresql/postgresql-query-builder.js.map +1 -1
  31. package/dist/schema/factory/relation-builder.d.ts +8 -8
  32. package/dist/schema/factory/relation-builder.js +9 -9
  33. package/dist/schema/factory/relation-builder.js.map +1 -1
  34. package/dist/schema/view-builder.js +2 -2
  35. package/dist/schema/view-builder.js.map +1 -1
  36. package/dist/types/column.d.ts +21 -21
  37. package/dist/types/column.js +5 -5
  38. package/dist/utils/result-parser.d.ts +11 -11
  39. package/dist/utils/result-parser.js +48 -48
  40. package/dist/utils/result-parser.js.map +1 -1
  41. package/docs/core.md +157 -0
  42. package/docs/expression.md +220 -0
  43. package/docs/query-builder.md +150 -0
  44. package/docs/queryable.md +261 -0
  45. package/docs/schema-builders.md +294 -0
  46. package/docs/types.md +520 -0
  47. package/package.json +7 -3
  48. package/src/exec/queryable.ts +18 -18
  49. package/src/expr/expr.ts +105 -105
  50. package/src/query-builder/mssql/mssql-expr-renderer.ts +17 -17
  51. package/src/query-builder/mssql/mssql-query-builder.ts +26 -26
  52. package/src/query-builder/mysql/mysql-expr-renderer.ts +14 -14
  53. package/src/query-builder/mysql/mysql-query-builder.ts +67 -67
  54. package/src/query-builder/postgresql/postgresql-expr-renderer.ts +13 -13
  55. package/src/query-builder/postgresql/postgresql-query-builder.ts +47 -47
  56. package/src/schema/factory/relation-builder.ts +9 -9
  57. package/src/schema/view-builder.ts +2 -2
  58. package/src/types/column.ts +23 -23
  59. package/src/utils/result-parser.ts +49 -49
package/dist/expr/expr.js CHANGED
@@ -34,13 +34,13 @@ import { ExprUnit, WhereExprUnit } from "./expr-unit.js";
34
34
  export const expr = {
35
35
  //#region ========== 값 생성 ==========
36
36
  /**
37
- * Wrap literal value as ExprUnit
37
+ * 리터럴 값을 ExprUnit으로 래핑
38
38
  *
39
- * Widen to base type matching dataType, remove literal type
39
+ * dataType에 맞는 기본 타입으로 확장, 리터럴 타입 제거
40
40
  *
41
- * @param dataType - The data type of the value ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
42
- * @param value - Value to wrap (undefined allowed)
43
- * @returns Wrapped ExprUnit instance
41
+ * @param dataType - 값의 데이터 타입 ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
42
+ * @param value - 래핑할 (undefined 허용)
43
+ * @returns 래핑된 ExprUnit 인스턴스
44
44
  *
45
45
  * @example
46
46
  * ```typescript
@@ -61,13 +61,13 @@ export const expr = {
61
61
  return new ExprUnit(dataType, { type: "value", value });
62
62
  },
63
63
  /**
64
- * Generate column reference
64
+ * Column 참조 생성
65
65
  *
66
- * Typically proxy objects are used inside Queryable callbacks
66
+ * 일반적으로 Queryable 콜백 내부에서 프록시 객체를 사용
67
67
  *
68
- * @param dataType - Column data type
69
- * @param path - Column path (table alias, column name, etc.)
70
- * @returns Column reference ExprUnit instance
68
+ * @param dataType - Column 데이터 타입
69
+ * @param path - Column 경로 (테이블 별칭, column 이름 )
70
+ * @returns Column 참조 ExprUnit 인스턴스
71
71
  *
72
72
  * @example
73
73
  * ```typescript
@@ -79,13 +79,13 @@ export const expr = {
79
79
  return new ExprUnit(dataType, { type: "column", path });
80
80
  },
81
81
  /**
82
- * Raw SQL expression Generate (escape hatch)
82
+ * Raw SQL expression 생성 (이스케이프 해치)
83
83
  *
84
- * Use when you need to directly use DB-specific functions or syntax not supported by the ORM.
85
- * Used as tagged template literal, interpolated values are automatically parameterized
84
+ * ORM에서 지원하지 않는 DB 전용 함수나 구문을 직접 사용해야 사용.
85
+ * 태그드 템플릿 리터럴로 사용하며, 보간된 값은 자동으로 파라미터화됨
86
86
  *
87
- * @param dataType - Data type of the returned value
88
- * @returns Tagged template function
87
+ * @param dataType - 반환 값의 데이터 타입
88
+ * @returns 태그드 템플릿 함수
89
89
  *
90
90
  * @example
91
91
  * ```typescript
@@ -103,7 +103,7 @@ export const expr = {
103
103
  return (strings, ...values) => {
104
104
  const sql = strings.reduce((acc, str, i) => {
105
105
  if (i < values.length) {
106
- return acc + str + `$${i + 1}`; // placeholder (transformed by ExprRenderer)
106
+ return acc + str + `$${i + 1}`; // 플레이스홀더 (ExprRenderer에서 변환)
107
107
  }
108
108
  return acc + str;
109
109
  }, "");
@@ -114,13 +114,13 @@ export const expr = {
114
114
  //#endregion
115
115
  //#region ========== WHERE - Comparison operators ==========
116
116
  /**
117
- * Equality comparison (NULL-safe)
117
+ * 동등 비교 (NULL 안전)
118
118
  *
119
- * Safely compare even NULL values (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
119
+ * NULL 값도 안전하게 비교 (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
120
120
  *
121
- * @param source - Column or expression to compare
122
- * @param target - Target value or expression for comparison
123
- * @returns WHERE condition expression
121
+ * @param source - 비교할 column 또는 expression
122
+ * @param target - 비교 대상 또는 expression
123
+ * @returns WHERE 조건 expression
124
124
  *
125
125
  * @example
126
126
  * ```typescript
@@ -136,11 +136,11 @@ export const expr = {
136
136
  });
137
137
  },
138
138
  /**
139
- * Greater than comparison (>)
139
+ * 초과 비교 (>)
140
140
  *
141
- * @param source - Column or expression to compare
142
- * @param target - Target value or expression for comparison
143
- * @returns WHERE condition expression
141
+ * @param source - 비교할 column 또는 expression
142
+ * @param target - 비교 대상 또는 expression
143
+ * @returns WHERE 조건 expression
144
144
  *
145
145
  * @example
146
146
  * ```typescript
@@ -156,11 +156,11 @@ export const expr = {
156
156
  });
157
157
  },
158
158
  /**
159
- * Less than comparison (<)
159
+ * 미만 비교 (<)
160
160
  *
161
- * @param source - Column or expression to compare
162
- * @param target - Target value or expression for comparison
163
- * @returns WHERE condition expression
161
+ * @param source - 비교할 column 또는 expression
162
+ * @param target - 비교 대상 또는 expression
163
+ * @returns WHERE 조건 expression
164
164
  *
165
165
  * @example
166
166
  * ```typescript
@@ -176,11 +176,11 @@ export const expr = {
176
176
  });
177
177
  },
178
178
  /**
179
- * Greater than or equal comparison (>=)
179
+ * 이상 비교 (>=)
180
180
  *
181
- * @param source - Column or expression to compare
182
- * @param target - Target value or expression for comparison
183
- * @returns WHERE condition expression
181
+ * @param source - 비교할 column 또는 expression
182
+ * @param target - 비교 대상 또는 expression
183
+ * @returns WHERE 조건 expression
184
184
  *
185
185
  * @example
186
186
  * ```typescript
@@ -196,11 +196,11 @@ export const expr = {
196
196
  });
197
197
  },
198
198
  /**
199
- * Less than or equal comparison (<=)
199
+ * 이하 비교 (<=)
200
200
  *
201
- * @param source - Column or expression to compare
202
- * @param target - Target value or expression for comparison
203
- * @returns WHERE condition expression
201
+ * @param source - 비교할 column 또는 expression
202
+ * @param target - 비교 대상 또는 expression
203
+ * @returns WHERE 조건 expression
204
204
  *
205
205
  * @example
206
206
  * ```typescript
@@ -218,12 +218,12 @@ export const expr = {
218
218
  /**
219
219
  * range comparison (BETWEEN)
220
220
  *
221
- * If from/to is undefined, that direction is unbounded
221
+ * from/to undefined이면 해당 방향은 제한 없음
222
222
  *
223
- * @param source - Column or expression to compare
224
- * @param from - Start value (no lower bound if undefined)
225
- * @param to - End value (no upper bound if undefined)
226
- * @returns WHERE condition expression
223
+ * @param source - 비교할 column 또는 expression
224
+ * @param from - 시작 (undefined이면 하한 없음)
225
+ * @param to - (undefined이면 상한 없음)
226
+ * @returns WHERE 조건 expression
227
227
  *
228
228
  * @example
229
229
  * ```typescript
@@ -270,7 +270,7 @@ export const expr = {
270
270
  * LIKE pattern matching
271
271
  *
272
272
  * `%` matches zero or more characters, `_` matches a single character.
273
- * Special characters are escaped with `\`
273
+ * 특수 문자는 `\`로 이스케이프됨
274
274
  *
275
275
  * @param source - Column or expression to search
276
276
  * @param pattern - Search pattern (%, _ wildcards available)
@@ -294,9 +294,9 @@ export const expr = {
294
294
  });
295
295
  },
296
296
  /**
297
- * Regular expression pattern matching
297
+ * 정규식 패턴 매칭
298
298
  *
299
- * Note: regex syntax may differ between DBMS implementations
299
+ * 참고: 정규식 구문은 DBMS 구현에 따라 다를 수 있음
300
300
  *
301
301
  * @param source - Column or expression to search
302
302
  * @param pattern - Regular expression pattern
@@ -340,7 +340,7 @@ export const expr = {
340
340
  /**
341
341
  * IN (SELECT ...) - Compare against subquery results
342
342
  *
343
- * The subquery must SELECT only a single column
343
+ * 서브쿼리는 단일 column만 SELECT해야
344
344
  *
345
345
  * @param source - Column or expression to compare
346
346
  * @param query - Queryable that returns a single column
@@ -363,7 +363,7 @@ export const expr = {
363
363
  inQuery(source, query) {
364
364
  const queryDef = query.getSelectQueryDef();
365
365
  if (queryDef.select == null || Object.keys(queryDef.select).length !== 1) {
366
- throw new Error("inQuery subquery must SELECT only a single column.");
366
+ throw new Error("inQuery 서브쿼리는 단일 column만 SELECT해야 합니다.");
367
367
  }
368
368
  return new WhereExprUnit({
369
369
  type: "inQuery",
@@ -374,7 +374,7 @@ export const expr = {
374
374
  /**
375
375
  * EXISTS (SELECT ...) - Check if subquery returns any rows
376
376
  *
377
- * Returns true if the subquery returns one or more rows
377
+ * 서브쿼리가 하나 이상의 행을 반환하면 true 반환
378
378
  *
379
379
  * @param query - Queryable to check for existence
380
380
  * @returns WHERE condition expression
@@ -391,7 +391,7 @@ export const expr = {
391
391
  * ```
392
392
  */
393
393
  exists(query) {
394
- const { select: _, ...queryDefWithoutSelect } = query.getSelectQueryDef(); // EXISTS does not need SELECT clause, saves packet size
394
+ const { select: _, ...queryDefWithoutSelect } = query.getSelectQueryDef(); // EXISTS SELECT 절이 불필요, 패킷 크기 절약
395
395
  return new WhereExprUnit({
396
396
  type: "exists",
397
397
  query: queryDefWithoutSelect,
@@ -420,7 +420,7 @@ export const expr = {
420
420
  /**
421
421
  * AND operator - All conditions must be satisfied
422
422
  *
423
- * Combines multiple conditions with AND. Passing an array to where() automatically applies AND
423
+ * 여러 조건을 AND 결합. where() 배열을 전달하면 자동으로 AND 적용
424
424
  *
425
425
  * @param conditions - List of conditions to combine with AND
426
426
  * @returns Combined WHERE condition expression
@@ -474,9 +474,9 @@ export const expr = {
474
474
  //#endregion
475
475
  //#region ========== SELECT - String ==========
476
476
  /**
477
- * String concatenation (CONCAT)
477
+ * 문자열 연결 (CONCAT)
478
478
  *
479
- * NULL values are treated as empty strings (auto-transformed per DBMS)
479
+ * NULL 값은 문자열로 처리 (DBMS별 자동 변환)
480
480
  *
481
481
  * @param args - Strings to concatenate
482
482
  * @returns Concatenated string expression
@@ -496,7 +496,7 @@ export const expr = {
496
496
  });
497
497
  },
498
498
  /**
499
- * Extract specified length from the left of a string (LEFT)
499
+ * 문자열 왼쪽에서 지정 길이만큼 추출 (LEFT)
500
500
  *
501
501
  * @param source - Original string
502
502
  * @param length - Number of characters to extract
@@ -518,7 +518,7 @@ export const expr = {
518
518
  });
519
519
  },
520
520
  /**
521
- * Extract specified length from the right of a string (RIGHT)
521
+ * 문자열 오른쪽에서 지정 길이만큼 추출 (RIGHT)
522
522
  *
523
523
  * @param source - Original string
524
524
  * @param length - Number of characters to extract
@@ -540,7 +540,7 @@ export const expr = {
540
540
  });
541
541
  },
542
542
  /**
543
- * Remove whitespace from both sides of a string (TRIM)
543
+ * 문자열 양쪽 공백 제거 (TRIM)
544
544
  *
545
545
  * @param source - Original string
546
546
  * @returns String expression with whitespace removed
@@ -560,9 +560,9 @@ export const expr = {
560
560
  });
561
561
  },
562
562
  /**
563
- * Left padding (LPAD)
563
+ * 왼쪽 패딩 (LPAD)
564
564
  *
565
- * Repeatedly adds fillString on the left until the target length is reached
565
+ * 대상 길이에 도달할 때까지 왼쪽에 fillString을 반복 추가
566
566
  *
567
567
  * @param source - Original string
568
568
  * @param length - Target length
@@ -587,7 +587,7 @@ export const expr = {
587
587
  });
588
588
  },
589
589
  /**
590
- * String replacement (REPLACE)
590
+ * 문자열 치환 (REPLACE)
591
591
  *
592
592
  * @param source - Original string
593
593
  * @param from - String to find
@@ -611,7 +611,7 @@ export const expr = {
611
611
  });
612
612
  },
613
613
  /**
614
- * Convert string to uppercase (UPPER)
614
+ * 문자열 대문자 변환 (UPPER)
615
615
  *
616
616
  * @param source - Original string
617
617
  * @returns Uppercase string expression
@@ -631,7 +631,7 @@ export const expr = {
631
631
  });
632
632
  },
633
633
  /**
634
- * Convert string to lowercase (LOWER)
634
+ * 문자열 소문자 변환 (LOWER)
635
635
  *
636
636
  * @param source - Original string
637
637
  * @returns Lowercase string expression
@@ -651,7 +651,7 @@ export const expr = {
651
651
  });
652
652
  },
653
653
  /**
654
- * String length (character count)
654
+ * 문자열 길이 (문자 )
655
655
  *
656
656
  * @param source - Original string
657
657
  * @returns Character count
@@ -671,9 +671,9 @@ export const expr = {
671
671
  });
672
672
  },
673
673
  /**
674
- * String byte length
674
+ * 문자열 바이트 길이
675
675
  *
676
- * In UTF-8, CJK characters are 3 bytes each
676
+ * UTF-8에서 CJK 문자는 3바이트
677
677
  *
678
678
  * @param source - Original string
679
679
  * @returns Byte count
@@ -693,9 +693,9 @@ export const expr = {
693
693
  });
694
694
  },
695
695
  /**
696
- * Extract part of a string (SUBSTRING)
696
+ * 문자열 부분 추출 (SUBSTRING)
697
697
  *
698
- * Uses 1-based index per SQL standard
698
+ * SQL 표준에 따라 1부터 시작하는 인덱스 사용
699
699
  *
700
700
  * @param source - Original string
701
701
  * @param start - Start position (starting from 1)
@@ -720,9 +720,9 @@ export const expr = {
720
720
  });
721
721
  },
722
722
  /**
723
- * Find position within a string (LOCATE/CHARINDEX)
723
+ * 문자열 위치 찾기 (LOCATE/CHARINDEX)
724
724
  *
725
- * Returns 1-based index, or 0 if not found
725
+ * 1부터 시작하는 인덱스 반환, 찾지 못하면 0 반환
726
726
  *
727
727
  * @param source - String to search in
728
728
  * @param search - String to find
@@ -747,7 +747,7 @@ export const expr = {
747
747
  //#endregion
748
748
  //#region ========== SELECT - Number ==========
749
749
  /**
750
- * Absolute value (ABS)
750
+ * 절대값 (ABS)
751
751
  *
752
752
  * @param source - Original number
753
753
  * @returns Absolute value expression
@@ -767,7 +767,7 @@ export const expr = {
767
767
  });
768
768
  },
769
769
  /**
770
- * Round (ROUND)
770
+ * 반올림 (ROUND)
771
771
  *
772
772
  * @param source - Original number
773
773
  * @param digits - Number of decimal places
@@ -790,7 +790,7 @@ export const expr = {
790
790
  });
791
791
  },
792
792
  /**
793
- * Ceiling (CEILING)
793
+ * 올림 (CEILING)
794
794
  *
795
795
  * @param source - Original number
796
796
  * @returns Ceiling number expression
@@ -811,7 +811,7 @@ export const expr = {
811
811
  });
812
812
  },
813
813
  /**
814
- * Floor (FLOOR)
814
+ * 내림 (FLOOR)
815
815
  *
816
816
  * @param source - Original number
817
817
  * @returns Floor number expression
@@ -834,7 +834,7 @@ export const expr = {
834
834
  //#endregion
835
835
  //#region ========== SELECT - Date ==========
836
836
  /**
837
- * Extract year (YEAR)
837
+ * 연도 추출 (YEAR)
838
838
  *
839
839
  * @param source - DateTime or DateOnly expression
840
840
  * @returns Year (4-digit number)
@@ -854,7 +854,7 @@ export const expr = {
854
854
  });
855
855
  },
856
856
  /**
857
- * Extract month (MONTH)
857
+ * 추출 (MONTH)
858
858
  *
859
859
  * @param source - DateTime or DateOnly expression
860
860
  * @returns Month (1~12)
@@ -874,7 +874,7 @@ export const expr = {
874
874
  });
875
875
  },
876
876
  /**
877
- * Extract day (DAY)
877
+ * 추출 (DAY)
878
878
  *
879
879
  * @param source - DateTime or DateOnly expression
880
880
  * @returns Day (1~31)
@@ -894,7 +894,7 @@ export const expr = {
894
894
  });
895
895
  },
896
896
  /**
897
- * Extract hour (HOUR)
897
+ * 추출 (HOUR)
898
898
  *
899
899
  * @param source - DateTime or Time expression
900
900
  * @returns Hour (0~23)
@@ -914,7 +914,7 @@ export const expr = {
914
914
  });
915
915
  },
916
916
  /**
917
- * Extract minute (MINUTE)
917
+ * 추출 (MINUTE)
918
918
  *
919
919
  * @param source - DateTime or Time expression
920
920
  * @returns Minute (0~59)
@@ -934,7 +934,7 @@ export const expr = {
934
934
  });
935
935
  },
936
936
  /**
937
- * Extract second (SECOND)
937
+ * 추출 (SECOND)
938
938
  *
939
939
  * @param source - DateTime or Time expression
940
940
  * @returns Second (0~59)
@@ -954,7 +954,7 @@ export const expr = {
954
954
  });
955
955
  },
956
956
  /**
957
- * Extract ISO week number
957
+ * ISO 번호 추출
958
958
  *
959
959
  * ISO 8601 week number (starts Monday, 1~53)
960
960
  *
@@ -978,7 +978,7 @@ export const expr = {
978
978
  /**
979
979
  * ISO week start date (Monday)
980
980
  *
981
- * Returns the Monday of the week the given date belongs to
981
+ * 주어진 날짜가 속한 주의 월요일 반환
982
982
  *
983
983
  * @param source - DateOnly expression
984
984
  * @returns Week start date (Monday)
@@ -1000,7 +1000,7 @@ export const expr = {
1000
1000
  /**
1001
1001
  * ISO year-month (first day of the month)
1002
1002
  *
1003
- * Returns the first day of the month for the given date
1003
+ * 주어진 날짜의 해당 첫째 반환
1004
1004
  *
1005
1005
  * @param source - DateOnly expression
1006
1006
  * @returns First day of the month
@@ -1020,7 +1020,7 @@ export const expr = {
1020
1020
  });
1021
1021
  },
1022
1022
  /**
1023
- * Calculate date difference (DATEDIFF)
1023
+ * 날짜 차이 계산 (DATEDIFF)
1024
1024
  *
1025
1025
  * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1026
1026
  * @param from - Start date
@@ -1044,7 +1044,7 @@ export const expr = {
1044
1044
  });
1045
1045
  },
1046
1046
  /**
1047
- * Add to date (DATEADD)
1047
+ * 날짜 더하기 (DATEADD)
1048
1048
  *
1049
1049
  * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1050
1050
  * @param source - Original date
@@ -1068,9 +1068,9 @@ export const expr = {
1068
1068
  });
1069
1069
  },
1070
1070
  /**
1071
- * Date format (DATE_FORMAT)
1071
+ * 날짜 포맷 (DATE_FORMAT)
1072
1072
  *
1073
- * Format string rules may differ between DBMS implementations
1073
+ * 포맷 문자열 규칙은 DBMS 구현에 따라 다를 수 있음
1074
1074
  *
1075
1075
  * @param source - Date expression
1076
1076
  * @param format - Format string (e.g., "%Y-%m-%d")
@@ -1097,7 +1097,7 @@ export const expr = {
1097
1097
  /**
1098
1098
  * NULL replacement (COALESCE/IFNULL)
1099
1099
  *
1100
- * Returns the first non-null value. If the last argument is non-nullable, the result is also non-nullable
1100
+ * 번째 non-null 반환. 마지막 인수가 non-nullable이면 결과도 non-nullable
1101
1101
  *
1102
1102
  * @param args - Values to inspect (last is default value)
1103
1103
  * @returns First non-null value
@@ -1112,9 +1112,9 @@ export const expr = {
1112
1112
  */
1113
1113
  coalesce,
1114
1114
  /**
1115
- * Return NULL if value matches (NULLIF)
1115
+ * 값이 일치하면 NULL 반환 (NULLIF)
1116
1116
  *
1117
- * Returns NULL if source === value, otherwise returns source
1117
+ * source === value이면 NULL 반환, 아니면 source 반환
1118
1118
  *
1119
1119
  * @param source - Original value
1120
1120
  * @param value - Value to compare
@@ -1137,9 +1137,9 @@ export const expr = {
1137
1137
  });
1138
1138
  },
1139
1139
  /**
1140
- * Transform WHERE expression to boolean
1140
+ * WHERE expression boolean으로 변환
1141
1141
  *
1142
- * Used when condition results should be used as a boolean column in SELECT clause
1142
+ * 조건 결과를 SELECT 절에서 boolean column으로 사용할 사용
1143
1143
  *
1144
1144
  * @param condition - Condition to transform
1145
1145
  * @returns boolean expression
@@ -1161,7 +1161,7 @@ export const expr = {
1161
1161
  /**
1162
1162
  * CASE WHEN expression builder
1163
1163
  *
1164
- * Build conditional branches using method chaining
1164
+ * 메서드 체이닝으로 조건 분기 구성
1165
1165
  *
1166
1166
  * @returns SwitchExprBuilder instance
1167
1167
  *
@@ -1181,7 +1181,7 @@ export const expr = {
1181
1181
  return createSwitchBuilder();
1182
1182
  },
1183
1183
  /**
1184
- * Simple IF condition (ternary operator)
1184
+ * 단순 IF 조건 (삼항 연산자)
1185
1185
  *
1186
1186
  * @param condition - Condition
1187
1187
  * @param then - Value when condition is true
@@ -1224,7 +1224,7 @@ export const expr = {
1224
1224
  //#region ========== SELECT - Aggregate ==========
1225
1225
  // SUM, AVG, MAX 등 집계는 모든 값이 NULL이거나 행이 없을 때만 NULL 반환 (NULL 값을 가진 행은 무시됨)
1226
1226
  /**
1227
- * Count rows (COUNT)
1227
+ * 세기 (COUNT)
1228
1228
  *
1229
1229
  * @param arg - Column to count (all rows if omitted)
1230
1230
  * @param distinct - If true, remove duplicates
@@ -1249,7 +1249,7 @@ export const expr = {
1249
1249
  });
1250
1250
  },
1251
1251
  /**
1252
- * Sum (SUM)
1252
+ * 합계 (SUM)
1253
1253
  *
1254
1254
  * NULL values are ignored. Returns NULL if all values are NULL
1255
1255
  *
@@ -1271,7 +1271,7 @@ export const expr = {
1271
1271
  });
1272
1272
  },
1273
1273
  /**
1274
- * Average (AVG)
1274
+ * 평균 (AVG)
1275
1275
  *
1276
1276
  * NULL values are ignored. Returns NULL if all values are NULL
1277
1277
  *
@@ -1293,7 +1293,7 @@ export const expr = {
1293
1293
  });
1294
1294
  },
1295
1295
  /**
1296
- * Maximum value (MAX)
1296
+ * 최대값 (MAX)
1297
1297
  *
1298
1298
  * NULL values are ignored. Returns NULL if all values are NULL
1299
1299
  *
@@ -1315,7 +1315,7 @@ export const expr = {
1315
1315
  });
1316
1316
  },
1317
1317
  /**
1318
- * Minimum value (MIN)
1318
+ * 최소값 (MIN)
1319
1319
  *
1320
1320
  * NULL values are ignored. Returns NULL if all values are NULL
1321
1321
  *
@@ -1339,7 +1339,7 @@ export const expr = {
1339
1339
  //#endregion
1340
1340
  //#region ========== SELECT - Other ==========
1341
1341
  /**
1342
- * Greatest value among multiple values (GREATEST)
1342
+ * 여러 최대값 선택 (GREATEST)
1343
1343
  *
1344
1344
  * @param args - Values to compare
1345
1345
  * @returns Greatest value
@@ -1359,7 +1359,7 @@ export const expr = {
1359
1359
  });
1360
1360
  },
1361
1361
  /**
1362
- * Least value among multiple values (LEAST)
1362
+ * 여러 최소값 선택 (LEAST)
1363
1363
  *
1364
1364
  * @param args - Values to compare
1365
1365
  * @returns Least value
@@ -1379,7 +1379,7 @@ export const expr = {
1379
1379
  });
1380
1380
  },
1381
1381
  /**
1382
- * Row number (sequential number for all rows without ROW_NUMBER)
1382
+ * 번호 (ROW_NUMBER 없이 모든 행에 순번 부여)
1383
1383
  *
1384
1384
  * @returns Row number (starting from 1)
1385
1385
  *
@@ -1397,9 +1397,9 @@ export const expr = {
1397
1397
  });
1398
1398
  },
1399
1399
  /**
1400
- * Generate random number (RAND/RANDOM)
1400
+ * 난수 생성 (RAND/RANDOM)
1401
1401
  *
1402
- * Returns a random number between 0 and 1. Mainly used for random ordering in ORDER BY
1402
+ * 0 1 사이의 난수 반환. 주로 ORDER BY에서 무작위 정렬에 사용
1403
1403
  *
1404
1404
  * @returns Random number between 0 and 1
1405
1405
  *
@@ -1437,9 +1437,9 @@ export const expr = {
1437
1437
  });
1438
1438
  },
1439
1439
  /**
1440
- * Scalar Subquery - Subquery that returns a single value in SELECT clause
1440
+ * 스칼라 Subquery - SELECT 절에서 단일 값을 반환하는 서브쿼리
1441
1441
  *
1442
- * The subquery must return exactly one row and one column
1442
+ * 서브쿼리는 정확히 하나의 행과 하나의 column을 반환해야
1443
1443
  *
1444
1444
  * @param dataType - Data type of the returned value
1445
1445
  * @param queryable - Queryable that returns a scalar value
@@ -1470,7 +1470,7 @@ export const expr = {
1470
1470
  /**
1471
1471
  * ROW_NUMBER() - Row number within a partition
1472
1472
  *
1473
- * Assigns sequential numbers starting from 1 within each partition
1473
+ * 파티션 내에서 1부터 시작하는 순번 부여
1474
1474
  *
1475
1475
  * @param spec - Window spec (partitionBy, orderBy)
1476
1476
  * @returns Row number (starting from 1)
@@ -1806,7 +1806,7 @@ export const expr = {
1806
1806
  //#endregion
1807
1807
  //#region ========== Helper ==========
1808
1808
  /**
1809
- * Transform ExprInput to Expr (internal use)
1809
+ * ExprInput Expr 변환 (내부 사용)
1810
1810
  *
1811
1811
  * @param value - Value to transform
1812
1812
  * @returns Expr JSON AST