@simplysm/orm-common 14.0.1 → 14.0.4

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 +135 -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 +206 -0
  42. package/docs/expression.md +217 -0
  43. package/docs/query-builder.md +126 -0
  44. package/docs/queryable.md +236 -0
  45. package/docs/schema-builders.md +352 -0
  46. package/docs/types.md +501 -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/src/expr/expr.ts CHANGED
@@ -62,13 +62,13 @@ export const expr = {
62
62
  //#region ========== 값 생성 ==========
63
63
 
64
64
  /**
65
- * Wrap literal value as ExprUnit
65
+ * 리터럴 값을 ExprUnit으로 래핑
66
66
  *
67
- * Widen to base type matching dataType, remove literal type
67
+ * dataType에 맞는 기본 타입으로 확장, 리터럴 타입 제거
68
68
  *
69
- * @param dataType - The data type of the value ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
70
- * @param value - Value to wrap (undefined allowed)
71
- * @returns Wrapped ExprUnit instance
69
+ * @param dataType - 값의 데이터 타입 ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
70
+ * @param value - 래핑할 (undefined 허용)
71
+ * @returns 래핑된 ExprUnit 인스턴스
72
72
  *
73
73
  * @example
74
74
  * ```typescript
@@ -95,13 +95,13 @@ export const expr = {
95
95
  },
96
96
 
97
97
  /**
98
- * Generate column reference
98
+ * Column 참조 생성
99
99
  *
100
- * Typically proxy objects are used inside Queryable callbacks
100
+ * 일반적으로 Queryable 콜백 내부에서 프록시 객체를 사용
101
101
  *
102
- * @param dataType - Column data type
103
- * @param path - Column path (table alias, column name, etc.)
104
- * @returns Column reference ExprUnit instance
102
+ * @param dataType - Column 데이터 타입
103
+ * @param path - Column 경로 (테이블 별칭, column 이름 )
104
+ * @returns Column 참조 ExprUnit 인스턴스
105
105
  *
106
106
  * @example
107
107
  * ```typescript
@@ -117,13 +117,13 @@ export const expr = {
117
117
  },
118
118
 
119
119
  /**
120
- * Raw SQL expression Generate (escape hatch)
120
+ * Raw SQL expression 생성 (이스케이프 해치)
121
121
  *
122
- * Use when you need to directly use DB-specific functions or syntax not supported by the ORM.
123
- * Used as tagged template literal, interpolated values are automatically parameterized
122
+ * ORM에서 지원하지 않는 DB 전용 함수나 구문을 직접 사용해야 사용.
123
+ * 태그드 템플릿 리터럴로 사용하며, 보간된 값은 자동으로 파라미터화됨
124
124
  *
125
- * @param dataType - Data type of the returned value
126
- * @returns Tagged template function
125
+ * @param dataType - 반환 값의 데이터 타입
126
+ * @returns 태그드 템플릿 함수
127
127
  *
128
128
  * @example
129
129
  * ```typescript
@@ -146,7 +146,7 @@ export const expr = {
146
146
  return (strings, ...values) => {
147
147
  const sql = strings.reduce((acc, str, i) => {
148
148
  if (i < values.length) {
149
- return acc + str + `$${i + 1}`; // placeholder (transformed by ExprRenderer)
149
+ return acc + str + `$${i + 1}`; // 플레이스홀더 (ExprRenderer에서 변환)
150
150
  }
151
151
  return acc + str;
152
152
  }, "");
@@ -162,13 +162,13 @@ export const expr = {
162
162
  //#region ========== WHERE - Comparison operators ==========
163
163
 
164
164
  /**
165
- * Equality comparison (NULL-safe)
165
+ * 동등 비교 (NULL 안전)
166
166
  *
167
- * Safely compare even NULL values (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
167
+ * NULL 값도 안전하게 비교 (MySQL: `<=>`, MSSQL/PostgreSQL: `IS NULL OR =`)
168
168
  *
169
- * @param source - Column or expression to compare
170
- * @param target - Target value or expression for comparison
171
- * @returns WHERE condition expression
169
+ * @param source - 비교할 column 또는 expression
170
+ * @param target - 비교 대상 또는 expression
171
+ * @returns WHERE 조건 expression
172
172
  *
173
173
  * @example
174
174
  * ```typescript
@@ -185,11 +185,11 @@ export const expr = {
185
185
  },
186
186
 
187
187
  /**
188
- * Greater than comparison (>)
188
+ * 초과 비교 (>)
189
189
  *
190
- * @param source - Column or expression to compare
191
- * @param target - Target value or expression for comparison
192
- * @returns WHERE condition expression
190
+ * @param source - 비교할 column 또는 expression
191
+ * @param target - 비교 대상 또는 expression
192
+ * @returns WHERE 조건 expression
193
193
  *
194
194
  * @example
195
195
  * ```typescript
@@ -206,11 +206,11 @@ export const expr = {
206
206
  },
207
207
 
208
208
  /**
209
- * Less than comparison (<)
209
+ * 미만 비교 (<)
210
210
  *
211
- * @param source - Column or expression to compare
212
- * @param target - Target value or expression for comparison
213
- * @returns WHERE condition expression
211
+ * @param source - 비교할 column 또는 expression
212
+ * @param target - 비교 대상 또는 expression
213
+ * @returns WHERE 조건 expression
214
214
  *
215
215
  * @example
216
216
  * ```typescript
@@ -227,11 +227,11 @@ export const expr = {
227
227
  },
228
228
 
229
229
  /**
230
- * Greater than or equal comparison (>=)
230
+ * 이상 비교 (>=)
231
231
  *
232
- * @param source - Column or expression to compare
233
- * @param target - Target value or expression for comparison
234
- * @returns WHERE condition expression
232
+ * @param source - 비교할 column 또는 expression
233
+ * @param target - 비교 대상 또는 expression
234
+ * @returns WHERE 조건 expression
235
235
  *
236
236
  * @example
237
237
  * ```typescript
@@ -248,11 +248,11 @@ export const expr = {
248
248
  },
249
249
 
250
250
  /**
251
- * Less than or equal comparison (<=)
251
+ * 이하 비교 (<=)
252
252
  *
253
- * @param source - Column or expression to compare
254
- * @param target - Target value or expression for comparison
255
- * @returns WHERE condition expression
253
+ * @param source - 비교할 column 또는 expression
254
+ * @param target - 비교 대상 또는 expression
255
+ * @returns WHERE 조건 expression
256
256
  *
257
257
  * @example
258
258
  * ```typescript
@@ -271,12 +271,12 @@ export const expr = {
271
271
  /**
272
272
  * range comparison (BETWEEN)
273
273
  *
274
- * If from/to is undefined, that direction is unbounded
274
+ * from/to undefined이면 해당 방향은 제한 없음
275
275
  *
276
- * @param source - Column or expression to compare
277
- * @param from - Start value (no lower bound if undefined)
278
- * @param to - End value (no upper bound if undefined)
279
- * @returns WHERE condition expression
276
+ * @param source - 비교할 column 또는 expression
277
+ * @param from - 시작 (undefined이면 하한 없음)
278
+ * @param to - (undefined이면 상한 없음)
279
+ * @returns WHERE 조건 expression
280
280
  *
281
281
  * @example
282
282
  * ```typescript
@@ -333,7 +333,7 @@ export const expr = {
333
333
  * LIKE pattern matching
334
334
  *
335
335
  * `%` matches zero or more characters, `_` matches a single character.
336
- * Special characters are escaped with `\`
336
+ * 특수 문자는 `\`로 이스케이프됨
337
337
  *
338
338
  * @param source - Column or expression to search
339
339
  * @param pattern - Search pattern (%, _ wildcards available)
@@ -361,9 +361,9 @@ export const expr = {
361
361
  },
362
362
 
363
363
  /**
364
- * Regular expression pattern matching
364
+ * 정규식 패턴 매칭
365
365
  *
366
- * Note: regex syntax may differ between DBMS implementations
366
+ * 참고: 정규식 구문은 DBMS 구현에 따라 다를 수 있음
367
367
  *
368
368
  * @param source - Column or expression to search
369
369
  * @param pattern - Regular expression pattern
@@ -414,7 +414,7 @@ export const expr = {
414
414
  /**
415
415
  * IN (SELECT ...) - Compare against subquery results
416
416
  *
417
- * The subquery must SELECT only a single column
417
+ * 서브쿼리는 단일 column만 SELECT해야
418
418
  *
419
419
  * @param source - Column or expression to compare
420
420
  * @param query - Queryable that returns a single column
@@ -440,7 +440,7 @@ export const expr = {
440
440
  ): WhereExprUnit {
441
441
  const queryDef = query.getSelectQueryDef();
442
442
  if (queryDef.select == null || Object.keys(queryDef.select).length !== 1) {
443
- throw new Error("inQuery subquery must SELECT only a single column.");
443
+ throw new Error("inQuery 서브쿼리는 단일 column만 SELECT해야 합니다.");
444
444
  }
445
445
  return new WhereExprUnit({
446
446
  type: "inQuery",
@@ -452,7 +452,7 @@ export const expr = {
452
452
  /**
453
453
  * EXISTS (SELECT ...) - Check if subquery returns any rows
454
454
  *
455
- * Returns true if the subquery returns one or more rows
455
+ * 서브쿼리가 하나 이상의 행을 반환하면 true 반환
456
456
  *
457
457
  * @param query - Queryable to check for existence
458
458
  * @returns WHERE condition expression
@@ -469,7 +469,7 @@ export const expr = {
469
469
  * ```
470
470
  */
471
471
  exists(query: Queryable<any, any>): WhereExprUnit {
472
- const { select: _, ...queryDefWithoutSelect } = query.getSelectQueryDef(); // EXISTS does not need SELECT clause, saves packet size
472
+ const { select: _, ...queryDefWithoutSelect } = query.getSelectQueryDef(); // EXISTS SELECT 절이 불필요, 패킷 크기 절약
473
473
  return new WhereExprUnit({
474
474
  type: "exists",
475
475
  query: queryDefWithoutSelect,
@@ -502,7 +502,7 @@ export const expr = {
502
502
  /**
503
503
  * AND operator - All conditions must be satisfied
504
504
  *
505
- * Combines multiple conditions with AND. Passing an array to where() automatically applies AND
505
+ * 여러 조건을 AND 결합. where() 배열을 전달하면 자동으로 AND 적용
506
506
  *
507
507
  * @param conditions - List of conditions to combine with AND
508
508
  * @returns Combined WHERE condition expression
@@ -560,9 +560,9 @@ export const expr = {
560
560
  //#region ========== SELECT - String ==========
561
561
 
562
562
  /**
563
- * String concatenation (CONCAT)
563
+ * 문자열 연결 (CONCAT)
564
564
  *
565
- * NULL values are treated as empty strings (auto-transformed per DBMS)
565
+ * NULL 값은 문자열로 처리 (DBMS별 자동 변환)
566
566
  *
567
567
  * @param args - Strings to concatenate
568
568
  * @returns Concatenated string expression
@@ -583,7 +583,7 @@ export const expr = {
583
583
  },
584
584
 
585
585
  /**
586
- * Extract specified length from the left of a string (LEFT)
586
+ * 문자열 왼쪽에서 지정 길이만큼 추출 (LEFT)
587
587
  *
588
588
  * @param source - Original string
589
589
  * @param length - Number of characters to extract
@@ -606,7 +606,7 @@ export const expr = {
606
606
  },
607
607
 
608
608
  /**
609
- * Extract specified length from the right of a string (RIGHT)
609
+ * 문자열 오른쪽에서 지정 길이만큼 추출 (RIGHT)
610
610
  *
611
611
  * @param source - Original string
612
612
  * @param length - Number of characters to extract
@@ -629,7 +629,7 @@ export const expr = {
629
629
  },
630
630
 
631
631
  /**
632
- * Remove whitespace from both sides of a string (TRIM)
632
+ * 문자열 양쪽 공백 제거 (TRIM)
633
633
  *
634
634
  * @param source - Original string
635
635
  * @returns String expression with whitespace removed
@@ -650,9 +650,9 @@ export const expr = {
650
650
  },
651
651
 
652
652
  /**
653
- * Left padding (LPAD)
653
+ * 왼쪽 패딩 (LPAD)
654
654
  *
655
- * Repeatedly adds fillString on the left until the target length is reached
655
+ * 대상 길이에 도달할 때까지 왼쪽에 fillString을 반복 추가
656
656
  *
657
657
  * @param source - Original string
658
658
  * @param length - Target length
@@ -682,7 +682,7 @@ export const expr = {
682
682
  },
683
683
 
684
684
  /**
685
- * String replacement (REPLACE)
685
+ * 문자열 치환 (REPLACE)
686
686
  *
687
687
  * @param source - Original string
688
688
  * @param from - String to find
@@ -711,7 +711,7 @@ export const expr = {
711
711
  },
712
712
 
713
713
  /**
714
- * Convert string to uppercase (UPPER)
714
+ * 문자열 대문자 변환 (UPPER)
715
715
  *
716
716
  * @param source - Original string
717
717
  * @returns Uppercase string expression
@@ -732,7 +732,7 @@ export const expr = {
732
732
  },
733
733
 
734
734
  /**
735
- * Convert string to lowercase (LOWER)
735
+ * 문자열 소문자 변환 (LOWER)
736
736
  *
737
737
  * @param source - Original string
738
738
  * @returns Lowercase string expression
@@ -753,7 +753,7 @@ export const expr = {
753
753
  },
754
754
 
755
755
  /**
756
- * String length (character count)
756
+ * 문자열 길이 (문자 )
757
757
  *
758
758
  * @param source - Original string
759
759
  * @returns Character count
@@ -774,9 +774,9 @@ export const expr = {
774
774
  },
775
775
 
776
776
  /**
777
- * String byte length
777
+ * 문자열 바이트 길이
778
778
  *
779
- * In UTF-8, CJK characters are 3 bytes each
779
+ * UTF-8에서 CJK 문자는 3바이트
780
780
  *
781
781
  * @param source - Original string
782
782
  * @returns Byte count
@@ -797,9 +797,9 @@ export const expr = {
797
797
  },
798
798
 
799
799
  /**
800
- * Extract part of a string (SUBSTRING)
800
+ * 문자열 부분 추출 (SUBSTRING)
801
801
  *
802
- * Uses 1-based index per SQL standard
802
+ * SQL 표준에 따라 1부터 시작하는 인덱스 사용
803
803
  *
804
804
  * @param source - Original string
805
805
  * @param start - Start position (starting from 1)
@@ -829,9 +829,9 @@ export const expr = {
829
829
  },
830
830
 
831
831
  /**
832
- * Find position within a string (LOCATE/CHARINDEX)
832
+ * 문자열 위치 찾기 (LOCATE/CHARINDEX)
833
833
  *
834
- * Returns 1-based index, or 0 if not found
834
+ * 1부터 시작하는 인덱스 반환, 찾지 못하면 0 반환
835
835
  *
836
836
  * @param source - String to search in
837
837
  * @param search - String to find
@@ -859,7 +859,7 @@ export const expr = {
859
859
  //#region ========== SELECT - Number ==========
860
860
 
861
861
  /**
862
- * Absolute value (ABS)
862
+ * 절대값 (ABS)
863
863
  *
864
864
  * @param source - Original number
865
865
  * @returns Absolute value expression
@@ -880,7 +880,7 @@ export const expr = {
880
880
  },
881
881
 
882
882
  /**
883
- * Round (ROUND)
883
+ * 반올림 (ROUND)
884
884
  *
885
885
  * @param source - Original number
886
886
  * @param digits - Number of decimal places
@@ -904,7 +904,7 @@ export const expr = {
904
904
  },
905
905
 
906
906
  /**
907
- * Ceiling (CEILING)
907
+ * 올림 (CEILING)
908
908
  *
909
909
  * @param source - Original number
910
910
  * @returns Ceiling number expression
@@ -926,7 +926,7 @@ export const expr = {
926
926
  },
927
927
 
928
928
  /**
929
- * Floor (FLOOR)
929
+ * 내림 (FLOOR)
930
930
  *
931
931
  * @param source - Original number
932
932
  * @returns Floor number expression
@@ -952,7 +952,7 @@ export const expr = {
952
952
  //#region ========== SELECT - Date ==========
953
953
 
954
954
  /**
955
- * Extract year (YEAR)
955
+ * 연도 추출 (YEAR)
956
956
  *
957
957
  * @param source - DateTime or DateOnly expression
958
958
  * @returns Year (4-digit number)
@@ -975,7 +975,7 @@ export const expr = {
975
975
  },
976
976
 
977
977
  /**
978
- * Extract month (MONTH)
978
+ * 추출 (MONTH)
979
979
  *
980
980
  * @param source - DateTime or DateOnly expression
981
981
  * @returns Month (1~12)
@@ -998,7 +998,7 @@ export const expr = {
998
998
  },
999
999
 
1000
1000
  /**
1001
- * Extract day (DAY)
1001
+ * 추출 (DAY)
1002
1002
  *
1003
1003
  * @param source - DateTime or DateOnly expression
1004
1004
  * @returns Day (1~31)
@@ -1021,7 +1021,7 @@ export const expr = {
1021
1021
  },
1022
1022
 
1023
1023
  /**
1024
- * Extract hour (HOUR)
1024
+ * 추출 (HOUR)
1025
1025
  *
1026
1026
  * @param source - DateTime or Time expression
1027
1027
  * @returns Hour (0~23)
@@ -1044,7 +1044,7 @@ export const expr = {
1044
1044
  },
1045
1045
 
1046
1046
  /**
1047
- * Extract minute (MINUTE)
1047
+ * 추출 (MINUTE)
1048
1048
  *
1049
1049
  * @param source - DateTime or Time expression
1050
1050
  * @returns Minute (0~59)
@@ -1067,7 +1067,7 @@ export const expr = {
1067
1067
  },
1068
1068
 
1069
1069
  /**
1070
- * Extract second (SECOND)
1070
+ * 추출 (SECOND)
1071
1071
  *
1072
1072
  * @param source - DateTime or Time expression
1073
1073
  * @returns Second (0~59)
@@ -1090,7 +1090,7 @@ export const expr = {
1090
1090
  },
1091
1091
 
1092
1092
  /**
1093
- * Extract ISO week number
1093
+ * ISO 번호 추출
1094
1094
  *
1095
1095
  * ISO 8601 week number (starts Monday, 1~53)
1096
1096
  *
@@ -1117,7 +1117,7 @@ export const expr = {
1117
1117
  /**
1118
1118
  * ISO week start date (Monday)
1119
1119
  *
1120
- * Returns the Monday of the week the given date belongs to
1120
+ * 주어진 날짜가 속한 주의 월요일 반환
1121
1121
  *
1122
1122
  * @param source - DateOnly expression
1123
1123
  * @returns Week start date (Monday)
@@ -1140,7 +1140,7 @@ export const expr = {
1140
1140
  /**
1141
1141
  * ISO year-month (first day of the month)
1142
1142
  *
1143
- * Returns the first day of the month for the given date
1143
+ * 주어진 날짜의 해당 첫째 반환
1144
1144
  *
1145
1145
  * @param source - DateOnly expression
1146
1146
  * @returns First day of the month
@@ -1161,7 +1161,7 @@ export const expr = {
1161
1161
  },
1162
1162
 
1163
1163
  /**
1164
- * Calculate date difference (DATEDIFF)
1164
+ * 날짜 차이 계산 (DATEDIFF)
1165
1165
  *
1166
1166
  * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1167
1167
  * @param from - Start date
@@ -1190,7 +1190,7 @@ export const expr = {
1190
1190
  },
1191
1191
 
1192
1192
  /**
1193
- * Add to date (DATEADD)
1193
+ * 날짜 더하기 (DATEADD)
1194
1194
  *
1195
1195
  * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1196
1196
  * @param source - Original date
@@ -1219,9 +1219,9 @@ export const expr = {
1219
1219
  },
1220
1220
 
1221
1221
  /**
1222
- * Date format (DATE_FORMAT)
1222
+ * 날짜 포맷 (DATE_FORMAT)
1223
1223
  *
1224
- * Format string rules may differ between DBMS implementations
1224
+ * 포맷 문자열 규칙은 DBMS 구현에 따라 다를 수 있음
1225
1225
  *
1226
1226
  * @param source - Date expression
1227
1227
  * @param format - Format string (e.g., "%Y-%m-%d")
@@ -1254,7 +1254,7 @@ export const expr = {
1254
1254
  /**
1255
1255
  * NULL replacement (COALESCE/IFNULL)
1256
1256
  *
1257
- * Returns the first non-null value. If the last argument is non-nullable, the result is also non-nullable
1257
+ * 번째 non-null 반환. 마지막 인수가 non-nullable이면 결과도 non-nullable
1258
1258
  *
1259
1259
  * @param args - Values to inspect (last is default value)
1260
1260
  * @returns First non-null value
@@ -1270,9 +1270,9 @@ export const expr = {
1270
1270
  coalesce,
1271
1271
 
1272
1272
  /**
1273
- * Return NULL if value matches (NULLIF)
1273
+ * 값이 일치하면 NULL 반환 (NULLIF)
1274
1274
  *
1275
- * Returns NULL if source === value, otherwise returns source
1275
+ * source === value이면 NULL 반환, 아니면 source 반환
1276
1276
  *
1277
1277
  * @param source - Original value
1278
1278
  * @param value - Value to compare
@@ -1299,9 +1299,9 @@ export const expr = {
1299
1299
  },
1300
1300
 
1301
1301
  /**
1302
- * Transform WHERE expression to boolean
1302
+ * WHERE expression boolean으로 변환
1303
1303
  *
1304
- * Used when condition results should be used as a boolean column in SELECT clause
1304
+ * 조건 결과를 SELECT 절에서 boolean column으로 사용할 사용
1305
1305
  *
1306
1306
  * @param condition - Condition to transform
1307
1307
  * @returns boolean expression
@@ -1324,7 +1324,7 @@ export const expr = {
1324
1324
  /**
1325
1325
  * CASE WHEN expression builder
1326
1326
  *
1327
- * Build conditional branches using method chaining
1327
+ * 메서드 체이닝으로 조건 분기 구성
1328
1328
  *
1329
1329
  * @returns SwitchExprBuilder instance
1330
1330
  *
@@ -1345,7 +1345,7 @@ export const expr = {
1345
1345
  },
1346
1346
 
1347
1347
  /**
1348
- * Simple IF condition (ternary operator)
1348
+ * 단순 IF 조건 (삼항 연산자)
1349
1349
  *
1350
1350
  * @param condition - Condition
1351
1351
  * @param then - Value when condition is true
@@ -1397,7 +1397,7 @@ export const expr = {
1397
1397
  // SUM, AVG, MAX 등 집계는 모든 값이 NULL이거나 행이 없을 때만 NULL 반환 (NULL 값을 가진 행은 무시됨)
1398
1398
 
1399
1399
  /**
1400
- * Count rows (COUNT)
1400
+ * 세기 (COUNT)
1401
1401
  *
1402
1402
  * @param arg - Column to count (all rows if omitted)
1403
1403
  * @param distinct - If true, remove duplicates
@@ -1423,7 +1423,7 @@ export const expr = {
1423
1423
  },
1424
1424
 
1425
1425
  /**
1426
- * Sum (SUM)
1426
+ * 합계 (SUM)
1427
1427
  *
1428
1428
  * NULL values are ignored. Returns NULL if all values are NULL
1429
1429
  *
@@ -1446,7 +1446,7 @@ export const expr = {
1446
1446
  },
1447
1447
 
1448
1448
  /**
1449
- * Average (AVG)
1449
+ * 평균 (AVG)
1450
1450
  *
1451
1451
  * NULL values are ignored. Returns NULL if all values are NULL
1452
1452
  *
@@ -1469,7 +1469,7 @@ export const expr = {
1469
1469
  },
1470
1470
 
1471
1471
  /**
1472
- * Maximum value (MAX)
1472
+ * 최대값 (MAX)
1473
1473
  *
1474
1474
  * NULL values are ignored. Returns NULL if all values are NULL
1475
1475
  *
@@ -1492,7 +1492,7 @@ export const expr = {
1492
1492
  },
1493
1493
 
1494
1494
  /**
1495
- * Minimum value (MIN)
1495
+ * 최소값 (MIN)
1496
1496
  *
1497
1497
  * NULL values are ignored. Returns NULL if all values are NULL
1498
1498
  *
@@ -1519,7 +1519,7 @@ export const expr = {
1519
1519
  //#region ========== SELECT - Other ==========
1520
1520
 
1521
1521
  /**
1522
- * Greatest value among multiple values (GREATEST)
1522
+ * 여러 최대값 선택 (GREATEST)
1523
1523
  *
1524
1524
  * @param args - Values to compare
1525
1525
  * @returns Greatest value
@@ -1540,7 +1540,7 @@ export const expr = {
1540
1540
  },
1541
1541
 
1542
1542
  /**
1543
- * Least value among multiple values (LEAST)
1543
+ * 여러 최소값 선택 (LEAST)
1544
1544
  *
1545
1545
  * @param args - Values to compare
1546
1546
  * @returns Least value
@@ -1561,7 +1561,7 @@ export const expr = {
1561
1561
  },
1562
1562
 
1563
1563
  /**
1564
- * Row number (sequential number for all rows without ROW_NUMBER)
1564
+ * 번호 (ROW_NUMBER 없이 모든 행에 순번 부여)
1565
1565
  *
1566
1566
  * @returns Row number (starting from 1)
1567
1567
  *
@@ -1580,9 +1580,9 @@ export const expr = {
1580
1580
  },
1581
1581
 
1582
1582
  /**
1583
- * Generate random number (RAND/RANDOM)
1583
+ * 난수 생성 (RAND/RANDOM)
1584
1584
  *
1585
- * Returns a random number between 0 and 1. Mainly used for random ordering in ORDER BY
1585
+ * 0 1 사이의 난수 반환. 주로 ORDER BY에서 무작위 정렬에 사용
1586
1586
  *
1587
1587
  * @returns Random number between 0 and 1
1588
1588
  *
@@ -1625,9 +1625,9 @@ export const expr = {
1625
1625
  },
1626
1626
 
1627
1627
  /**
1628
- * Scalar Subquery - Subquery that returns a single value in SELECT clause
1628
+ * 스칼라 Subquery - SELECT 절에서 단일 값을 반환하는 서브쿼리
1629
1629
  *
1630
- * The subquery must return exactly one row and one column
1630
+ * 서브쿼리는 정확히 하나의 행과 하나의 column을 반환해야
1631
1631
  *
1632
1632
  * @param dataType - Data type of the returned value
1633
1633
  * @param queryable - Queryable that returns a scalar value
@@ -1664,7 +1664,7 @@ export const expr = {
1664
1664
  /**
1665
1665
  * ROW_NUMBER() - Row number within a partition
1666
1666
  *
1667
- * Assigns sequential numbers starting from 1 within each partition
1667
+ * 파티션 내에서 1부터 시작하는 순번 부여
1668
1668
  *
1669
1669
  * @param spec - Window spec (partitionBy, orderBy)
1670
1670
  * @returns Row number (starting from 1)
@@ -2035,7 +2035,7 @@ export const expr = {
2035
2035
  //#region ========== Helper ==========
2036
2036
 
2037
2037
  /**
2038
- * Transform ExprInput to Expr (internal use)
2038
+ * ExprInput Expr 변환 (내부 사용)
2039
2039
  *
2040
2040
  * @param value - Value to transform
2041
2041
  * @returns Expr JSON AST