@simplysm/orm-common 13.0.83 → 13.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/ddl/initialize.d.ts +2 -2
  2. package/dist/ddl/initialize.js +1 -1
  3. package/dist/ddl/initialize.js.map +1 -1
  4. package/dist/ddl/table-ddl.d.ts +1 -1
  5. package/dist/exec/queryable.d.ts +115 -115
  6. package/dist/exec/queryable.js +68 -68
  7. package/dist/exec/queryable.js.map +1 -1
  8. package/dist/expr/expr.d.ts +248 -248
  9. package/dist/expr/expr.js +250 -250
  10. package/dist/query-builder/base/expr-renderer-base.d.ts +7 -7
  11. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts +3 -3
  12. package/dist/query-builder/mssql/mssql-expr-renderer.d.ts.map +1 -1
  13. package/dist/query-builder/mssql/mssql-expr-renderer.js +5 -5
  14. package/dist/query-builder/mssql/mssql-query-builder.d.ts +2 -2
  15. package/dist/query-builder/mssql/mssql-query-builder.d.ts.map +1 -1
  16. package/dist/query-builder/mssql/mssql-query-builder.js +7 -7
  17. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts +2 -2
  18. package/dist/query-builder/mysql/mysql-expr-renderer.d.ts.map +1 -1
  19. package/dist/query-builder/mysql/mysql-expr-renderer.js +4 -4
  20. package/dist/query-builder/mysql/mysql-query-builder.d.ts +10 -10
  21. package/dist/query-builder/mysql/mysql-query-builder.d.ts.map +1 -1
  22. package/dist/query-builder/mysql/mysql-query-builder.js +4 -4
  23. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts +2 -2
  24. package/dist/query-builder/postgresql/postgresql-expr-renderer.d.ts.map +1 -1
  25. package/dist/query-builder/postgresql/postgresql-expr-renderer.js +4 -4
  26. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts +8 -8
  27. package/dist/query-builder/postgresql/postgresql-query-builder.d.ts.map +1 -1
  28. package/dist/query-builder/postgresql/postgresql-query-builder.js +7 -7
  29. package/dist/query-builder/query-builder.d.ts +1 -1
  30. package/dist/schema/factory/column-builder.d.ts +46 -46
  31. package/dist/schema/factory/column-builder.js +25 -25
  32. package/dist/schema/factory/index-builder.d.ts +22 -22
  33. package/dist/schema/factory/index-builder.js +14 -14
  34. package/dist/schema/factory/relation-builder.d.ts +93 -93
  35. package/dist/schema/factory/relation-builder.d.ts.map +1 -1
  36. package/dist/schema/factory/relation-builder.js +37 -37
  37. package/dist/schema/procedure-builder.d.ts +38 -38
  38. package/dist/schema/procedure-builder.d.ts.map +1 -1
  39. package/dist/schema/procedure-builder.js +26 -26
  40. package/dist/schema/table-builder.d.ts +38 -38
  41. package/dist/schema/table-builder.d.ts.map +1 -1
  42. package/dist/schema/table-builder.js +29 -29
  43. package/dist/schema/view-builder.d.ts +26 -26
  44. package/dist/schema/view-builder.d.ts.map +1 -1
  45. package/dist/schema/view-builder.js +18 -18
  46. package/dist/types/db.d.ts +40 -40
  47. package/dist/types/expr.d.ts +75 -75
  48. package/dist/types/expr.d.ts.map +1 -1
  49. package/dist/types/query-def.d.ts +32 -32
  50. package/dist/types/query-def.d.ts.map +1 -1
  51. package/package.json +2 -2
  52. package/src/ddl/initialize.ts +16 -16
  53. package/src/ddl/table-ddl.ts +1 -1
  54. package/src/exec/queryable.ts +163 -163
  55. package/src/expr/expr.ts +257 -257
  56. package/src/query-builder/base/expr-renderer-base.ts +8 -8
  57. package/src/query-builder/mssql/mssql-expr-renderer.ts +20 -20
  58. package/src/query-builder/mssql/mssql-query-builder.ts +28 -28
  59. package/src/query-builder/mysql/mysql-expr-renderer.ts +22 -22
  60. package/src/query-builder/mysql/mysql-query-builder.ts +65 -65
  61. package/src/query-builder/postgresql/postgresql-expr-renderer.ts +15 -15
  62. package/src/query-builder/postgresql/postgresql-query-builder.ts +43 -43
  63. package/src/query-builder/query-builder.ts +1 -1
  64. package/src/schema/factory/column-builder.ts +48 -48
  65. package/src/schema/factory/index-builder.ts +22 -22
  66. package/src/schema/factory/relation-builder.ts +95 -95
  67. package/src/schema/procedure-builder.ts +38 -38
  68. package/src/schema/table-builder.ts +38 -38
  69. package/src/schema/view-builder.ts +28 -28
  70. package/src/types/db.ts +41 -41
  71. package/src/types/expr.ts +79 -79
  72. package/src/types/query-def.ts +37 -37
  73. package/tests/ddl/basic.expected.ts +8 -8
package/src/expr/expr.ts CHANGED
@@ -66,9 +66,9 @@ export const expr = {
66
66
  *
67
67
  * Widen to base type matching dataType, remove literal type
68
68
  *
69
- * @param dataType - Value의 data type ("string", "number", "boolean", "DateTime", "DateOnly", "Time", "Uuid", "Buffer")
70
- * @param value - 래핑할 value (undefined allow)
71
- * @returns 래핑된 ExprUnit instance
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
72
72
  *
73
73
  * @example
74
74
  * ```typescript
@@ -271,16 +271,16 @@ export const expr = {
271
271
  /**
272
272
  * range comparison (BETWEEN)
273
273
  *
274
- * from/to undefined이면 해당 방향은 무제한
274
+ * If from/to is undefined, that direction is unbounded
275
275
  *
276
276
  * @param source - Column or expression to compare
277
- * @param from - start value (undefined이면 하한 N/A)
278
- * @param to - value (undefined이면 상한 N/A)
277
+ * @param from - Start value (no lower bound if undefined)
278
+ * @param to - End value (no upper bound if undefined)
279
279
  * @returns WHERE condition expression
280
280
  *
281
281
  * @example
282
282
  * ```typescript
283
- * // range 지정
283
+ * // Specify range
284
284
  * db.user().where((u) => [expr.between(u.age, 18, 65)])
285
285
  * // WHERE age BETWEEN 18 AND 65
286
286
  *
@@ -307,9 +307,9 @@ export const expr = {
307
307
  //#region ========== WHERE - NULL check ==========
308
308
 
309
309
  /**
310
- * NULL 체크 (IS NULL)
310
+ * NULL check (IS NULL)
311
311
  *
312
- * @param source - 체크할 column 또는 expression
312
+ * @param source - Column or expression to check
313
313
  * @returns WHERE condition expression
314
314
  *
315
315
  * @example
@@ -330,22 +330,22 @@ export const expr = {
330
330
  //#region ========== WHERE - String search ==========
331
331
 
332
332
  /**
333
- * LIKE pattern 매칭
333
+ * LIKE pattern matching
334
334
  *
335
- * `%`는 0개 이상의 문자, `_`는 단일 문자와 매칭.
336
- * 특수문자는 `\`로 escape됨
335
+ * `%` matches zero or more characters, `_` matches a single character.
336
+ * Special characters are escaped with `\`
337
337
  *
338
- * @param source - 검색할 column 또는 expression
339
- * @param pattern - 검색 pattern (%, _ wildcard 사용 가능)
338
+ * @param source - Column or expression to search
339
+ * @param pattern - Search pattern (%, _ wildcards available)
340
340
  * @returns WHERE condition expression
341
341
  *
342
342
  * @example
343
343
  * ```typescript
344
- * // 접두사 검색
344
+ * // Prefix search
345
345
  * db.user().where((u) => [expr.like(u.name, "John%")])
346
346
  * // WHERE name LIKE 'John%' ESCAPE '\'
347
347
  *
348
- * // include 검색
348
+ * // Contains search
349
349
  * db.user().where((u) => [expr.like(u.email, "%@gmail.com")])
350
350
  * ```
351
351
  */
@@ -361,12 +361,12 @@ export const expr = {
361
361
  },
362
362
 
363
363
  /**
364
- * regular expression pattern 매칭
364
+ * Regular expression pattern matching
365
365
  *
366
- * DBMS별 regular expression 문법 차이 주의 필요
366
+ * Note: regex syntax may differ between DBMS implementations
367
367
  *
368
- * @param source - 검색할 column 또는 expression
369
- * @param pattern - regular expression pattern
368
+ * @param source - Column or expression to search
369
+ * @param pattern - Regular expression pattern
370
370
  * @returns WHERE condition expression
371
371
  *
372
372
  * @example
@@ -391,10 +391,10 @@ export const expr = {
391
391
  //#region ========== WHERE - IN ==========
392
392
 
393
393
  /**
394
- * IN operator - Value 목록과 comparison
394
+ * IN operator - Compare against a list of values
395
395
  *
396
396
  * @param source - Column or expression to compare
397
- * @param values - 비교할 value 목록
397
+ * @param values - List of values to compare against
398
398
  * @returns WHERE condition expression
399
399
  *
400
400
  * @example
@@ -412,14 +412,14 @@ export const expr = {
412
412
  },
413
413
 
414
414
  /**
415
- * IN (SELECT ...) - Subquery 결과와 comparison
415
+ * IN (SELECT ...) - Compare against subquery results
416
416
  *
417
- * Subquery는 반드시 단일 column만 SELECT해야
417
+ * The subquery must SELECT only a single column
418
418
  *
419
419
  * @param source - Column or expression to compare
420
- * @param query - 단일 column을 반환하는 Queryable
420
+ * @param query - Queryable that returns a single column
421
421
  * @returns WHERE condition expression
422
- * @throws {Error} Subquery가 단일 column이 아닌 경우
422
+ * @throws {Error} When the subquery does not return a single column
423
423
  *
424
424
  * @example
425
425
  * ```typescript
@@ -450,16 +450,16 @@ export const expr = {
450
450
  },
451
451
 
452
452
  /**
453
- * EXISTS (SELECT ...) - Subquery result 존재 여부 확인
453
+ * EXISTS (SELECT ...) - Check if subquery returns any rows
454
454
  *
455
- * Subquery가 하나 이상의 행을 반환하면 true
455
+ * Returns true if the subquery returns one or more rows
456
456
  *
457
- * @param query - 존재 여부를 확인할 Queryable
457
+ * @param query - Queryable to check for existence
458
458
  * @returns WHERE condition expression
459
459
  *
460
460
  * @example
461
461
  * ```typescript
462
- * // 주문이 있는 사용자 조회
462
+ * // Query users who have orders
463
463
  * db.user().where((u) => [
464
464
  * expr.exists(
465
465
  * db.order().where((o) => [expr.eq(o.userId, u.id)])
@@ -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 SELECT 불필요, 패킷 절약
472
+ const { select: _, ...queryDefWithoutSelect } = query.getSelectQueryDef(); // EXISTS does not need SELECT clause, saves packet size
473
473
  return new WhereExprUnit({
474
474
  type: "exists",
475
475
  query: queryDefWithoutSelect,
@@ -481,10 +481,10 @@ export const expr = {
481
481
  //#region ========== WHERE - Logical operators ==========
482
482
 
483
483
  /**
484
- * NOT operator - Condition 부정
484
+ * NOT operator - Negate a condition
485
485
  *
486
- * @param arg - 부정할 condition
487
- * @returns 부정된 WHERE condition expression
486
+ * @param arg - Condition to negate
487
+ * @returns Negated WHERE condition expression
488
488
  *
489
489
  * @example
490
490
  * ```typescript
@@ -500,12 +500,12 @@ export const expr = {
500
500
  },
501
501
 
502
502
  /**
503
- * AND operator - 모든 condition 충족
503
+ * AND operator - All conditions must be satisfied
504
504
  *
505
- * 여러 조건을 AND 결합. where() 메서드에 배열로 전달하면 automatic으로 AND applied
505
+ * Combines multiple conditions with AND. Passing an array to where() automatically applies AND
506
506
  *
507
- * @param conditions - AND로 결합할 condition 목록
508
- * @returns 결합된 WHERE condition expression
507
+ * @param conditions - List of conditions to combine with AND
508
+ * @returns Combined WHERE condition expression
509
509
  *
510
510
  * @example
511
511
  * ```typescript
@@ -529,10 +529,10 @@ export const expr = {
529
529
  },
530
530
 
531
531
  /**
532
- * OR operator - 하나 이상의 condition 충족
532
+ * OR operator - At least one condition must be satisfied
533
533
  *
534
- * @param conditions - OR로 결합할 condition 목록
535
- * @returns 결합된 WHERE condition expression
534
+ * @param conditions - List of conditions to combine with OR
535
+ * @returns Combined WHERE condition expression
536
536
  *
537
537
  * @example
538
538
  * ```typescript
@@ -557,15 +557,15 @@ export const expr = {
557
557
 
558
558
  //#endregion
559
559
 
560
- //#region ========== SELECT - 문자열 ==========
560
+ //#region ========== SELECT - String ==========
561
561
 
562
562
  /**
563
- * 문자열 연결 (CONCAT)
563
+ * String concatenation (CONCAT)
564
564
  *
565
- * NULL 값은 문자열로 processing됨 (DBMS별 automatic Transform)
565
+ * NULL values are treated as empty strings (auto-transformed per DBMS)
566
566
  *
567
- * @param args - 연결할 문자열들
568
- * @returns 연결된 문자열 expression
567
+ * @param args - Strings to concatenate
568
+ * @returns Concatenated string expression
569
569
  *
570
570
  * @example
571
571
  * ```typescript
@@ -583,11 +583,11 @@ export const expr = {
583
583
  },
584
584
 
585
585
  /**
586
- * 문자열 왼쪽에서 지정 길이만큼 추출 (LEFT)
586
+ * Extract specified length from the left of a string (LEFT)
587
587
  *
588
- * @param source - original string
589
- * @param length - 추출할 문자
590
- * @returns 추출된 문자열 expression
588
+ * @param source - Original string
589
+ * @param length - Number of characters to extract
590
+ * @returns Extracted string expression
591
591
  *
592
592
  * @example
593
593
  * ```typescript
@@ -606,11 +606,11 @@ export const expr = {
606
606
  },
607
607
 
608
608
  /**
609
- * 문자열 오른쪽에서 지정 길이만큼 추출 (RIGHT)
609
+ * Extract specified length from the right of a string (RIGHT)
610
610
  *
611
- * @param source - original string
612
- * @param length - 추출할 문자
613
- * @returns 추출된 문자열 expression
611
+ * @param source - Original string
612
+ * @param length - Number of characters to extract
613
+ * @returns Extracted string expression
614
614
  *
615
615
  * @example
616
616
  * ```typescript
@@ -629,10 +629,10 @@ export const expr = {
629
629
  },
630
630
 
631
631
  /**
632
- * 문자열 양쪽 공백 Remove (TRIM)
632
+ * Remove whitespace from both sides of a string (TRIM)
633
633
  *
634
- * @param source - original string
635
- * @returns 공백이 제거된 문자열 expression
634
+ * @param source - Original string
635
+ * @returns String expression with whitespace removed
636
636
  *
637
637
  * @example
638
638
  * ```typescript
@@ -650,14 +650,14 @@ export const expr = {
650
650
  },
651
651
 
652
652
  /**
653
- * 문자열 왼쪽 패딩 (LPAD)
653
+ * Left padding (LPAD)
654
654
  *
655
- * 지정 길이가 때까지 왼쪽에 fillString loop Add
655
+ * Repeatedly adds fillString on the left until the target length is reached
656
656
  *
657
- * @param source - original string
658
- * @param length - 목표 길이
659
- * @param fillString - 패딩에 사용할 문자열
660
- * @returns 패딩된 문자열 expression
657
+ * @param source - Original string
658
+ * @param length - Target length
659
+ * @param fillString - String to use for padding
660
+ * @returns Padded string expression
661
661
  *
662
662
  * @example
663
663
  * ```typescript
@@ -682,12 +682,12 @@ export const expr = {
682
682
  },
683
683
 
684
684
  /**
685
- * 문자열 치환 (REPLACE)
685
+ * String replacement (REPLACE)
686
686
  *
687
- * @param source - original string
688
- * @param from - 찾을 문자열
689
- * @param to - 대체할 문자열
690
- * @returns 치환된 문자열 expression
687
+ * @param source - Original string
688
+ * @param from - String to find
689
+ * @param to - Replacement string
690
+ * @returns Replaced string expression
691
691
  *
692
692
  * @example
693
693
  * ```typescript
@@ -711,10 +711,10 @@ export const expr = {
711
711
  },
712
712
 
713
713
  /**
714
- * 문자열 대문자 Transform (UPPER)
714
+ * Convert string to uppercase (UPPER)
715
715
  *
716
- * @param source - original string
717
- * @returns 대문자로 Transform된 문자열 expression
716
+ * @param source - Original string
717
+ * @returns Uppercase string expression
718
718
  *
719
719
  * @example
720
720
  * ```typescript
@@ -732,10 +732,10 @@ export const expr = {
732
732
  },
733
733
 
734
734
  /**
735
- * 문자열 소문자 Transform (LOWER)
735
+ * Convert string to lowercase (LOWER)
736
736
  *
737
- * @param source - original string
738
- * @returns 소문자로 Transform된 문자열 expression
737
+ * @param source - Original string
738
+ * @returns Lowercase string expression
739
739
  *
740
740
  * @example
741
741
  * ```typescript
@@ -753,10 +753,10 @@ export const expr = {
753
753
  },
754
754
 
755
755
  /**
756
- * 문자열 길이 (문자 )
756
+ * String length (character count)
757
757
  *
758
- * @param source - original string
759
- * @returns 문자
758
+ * @param source - Original string
759
+ * @returns Character count
760
760
  *
761
761
  * @example
762
762
  * ```typescript
@@ -774,12 +774,12 @@ export const expr = {
774
774
  },
775
775
 
776
776
  /**
777
- * 문자열 바이트 길이
777
+ * String byte length
778
778
  *
779
- * UTF-8 환경에서 한글은 3바이트
779
+ * In UTF-8, CJK characters are 3 bytes each
780
780
  *
781
- * @param source - original string
782
- * @returns 바이트
781
+ * @param source - Original string
782
+ * @returns Byte count
783
783
  *
784
784
  * @example
785
785
  * ```typescript
@@ -797,19 +797,19 @@ export const expr = {
797
797
  },
798
798
 
799
799
  /**
800
- * 문자열 일부 추출 (SUBSTRING)
800
+ * Extract part of a string (SUBSTRING)
801
801
  *
802
- * SQL 표준에 따라 1-based index 사용
802
+ * Uses 1-based index per SQL standard
803
803
  *
804
- * @param source - original string
805
- * @param start - start 위치 (1부터 start)
806
- * @param length - 추출할 길이 (생략 끝까지)
807
- * @returns 추출된 문자열 expression
804
+ * @param source - Original string
805
+ * @param start - Start position (starting from 1)
806
+ * @param length - Length to extract (to the end if omitted)
807
+ * @returns Extracted string expression
808
808
  *
809
809
  * @example
810
810
  * ```typescript
811
811
  * db.user().select((u) => ({
812
- * // "Hello World"에서 Index 1부터 5글자: "Hello"
812
+ * // From "Hello World", 5 characters starting at index 1: "Hello"
813
813
  * prefix: expr.substring(u.name, 1, 5),
814
814
  * }))
815
815
  * // SELECT SUBSTRING(name, 1, 5) AS prefix
@@ -829,13 +829,13 @@ export const expr = {
829
829
  },
830
830
 
831
831
  /**
832
- * 문자열 위치 찾기 (LOCATE/CHARINDEX)
832
+ * Find position within a string (LOCATE/CHARINDEX)
833
833
  *
834
- * 1-based index return, 없으면 0 return
834
+ * Returns 1-based index, or 0 if not found
835
835
  *
836
- * @param source - 검색할 문자열
837
- * @param search - 찾을 문자열
838
- * @returns 위치 (1부터 start, 없으면 0)
836
+ * @param source - String to search in
837
+ * @param search - String to find
838
+ * @returns Position (starting from 1, 0 if not found)
839
839
  *
840
840
  * @example
841
841
  * ```typescript
@@ -859,10 +859,10 @@ export const expr = {
859
859
  //#region ========== SELECT - Number ==========
860
860
 
861
861
  /**
862
- * 절대값 (ABS)
862
+ * Absolute value (ABS)
863
863
  *
864
- * @param source - 원본 Number
865
- * @returns 절대값 expression
864
+ * @param source - Original number
865
+ * @returns Absolute value expression
866
866
  *
867
867
  * @example
868
868
  * ```typescript
@@ -880,11 +880,11 @@ export const expr = {
880
880
  },
881
881
 
882
882
  /**
883
- * 반올림 (ROUND)
883
+ * Round (ROUND)
884
884
  *
885
- * @param source - 원본 Number
886
- * @param digits - 소수점 이하 자릿수
887
- * @returns 반올림된 Number expression
885
+ * @param source - Original number
886
+ * @param digits - Number of decimal places
887
+ * @returns Rounded number expression
888
888
  *
889
889
  * @example
890
890
  * ```typescript
@@ -904,10 +904,10 @@ export const expr = {
904
904
  },
905
905
 
906
906
  /**
907
- * 올림 (CEILING)
907
+ * Ceiling (CEILING)
908
908
  *
909
- * @param source - 원본 Number
910
- * @returns 올림된 Number expression
909
+ * @param source - Original number
910
+ * @returns Ceiling number expression
911
911
  *
912
912
  * @example
913
913
  * ```typescript
@@ -926,10 +926,10 @@ export const expr = {
926
926
  },
927
927
 
928
928
  /**
929
- * 버림 (FLOOR)
929
+ * Floor (FLOOR)
930
930
  *
931
- * @param source - 원본 Number
932
- * @returns 버림된 Number expression
931
+ * @param source - Original number
932
+ * @returns Floor number expression
933
933
  *
934
934
  * @example
935
935
  * ```typescript
@@ -952,10 +952,10 @@ export const expr = {
952
952
  //#region ========== SELECT - Date ==========
953
953
 
954
954
  /**
955
- * 연도 추출 (YEAR)
955
+ * Extract year (YEAR)
956
956
  *
957
- * @param source - DateTime 또는 DateOnly expression
958
- * @returns 연도 (4자리 Number)
957
+ * @param source - DateTime or DateOnly expression
958
+ * @returns Year (4-digit number)
959
959
  *
960
960
  * @example
961
961
  * ```typescript
@@ -975,10 +975,10 @@ export const expr = {
975
975
  },
976
976
 
977
977
  /**
978
- * 추출 (MONTH)
978
+ * Extract month (MONTH)
979
979
  *
980
- * @param source - DateTime 또는 DateOnly expression
981
- * @returns (1~12)
980
+ * @param source - DateTime or DateOnly expression
981
+ * @returns Month (1~12)
982
982
  *
983
983
  * @example
984
984
  * ```typescript
@@ -998,10 +998,10 @@ export const expr = {
998
998
  },
999
999
 
1000
1000
  /**
1001
- * 추출 (DAY)
1001
+ * Extract day (DAY)
1002
1002
  *
1003
- * @param source - DateTime 또는 DateOnly expression
1004
- * @returns (1~31)
1003
+ * @param source - DateTime or DateOnly expression
1004
+ * @returns Day (1~31)
1005
1005
  *
1006
1006
  * @example
1007
1007
  * ```typescript
@@ -1021,10 +1021,10 @@ export const expr = {
1021
1021
  },
1022
1022
 
1023
1023
  /**
1024
- * 추출 (HOUR)
1024
+ * Extract hour (HOUR)
1025
1025
  *
1026
- * @param source - DateTime 또는 Time expression
1027
- * @returns (0~23)
1026
+ * @param source - DateTime or Time expression
1027
+ * @returns Hour (0~23)
1028
1028
  *
1029
1029
  * @example
1030
1030
  * ```typescript
@@ -1044,10 +1044,10 @@ export const expr = {
1044
1044
  },
1045
1045
 
1046
1046
  /**
1047
- * 추출 (MINUTE)
1047
+ * Extract minute (MINUTE)
1048
1048
  *
1049
- * @param source - DateTime 또는 Time expression
1050
- * @returns (0~59)
1049
+ * @param source - DateTime or Time expression
1050
+ * @returns Minute (0~59)
1051
1051
  *
1052
1052
  * @example
1053
1053
  * ```typescript
@@ -1067,10 +1067,10 @@ export const expr = {
1067
1067
  },
1068
1068
 
1069
1069
  /**
1070
- * 추출 (SECOND)
1070
+ * Extract second (SECOND)
1071
1071
  *
1072
- * @param source - DateTime 또는 Time expression
1073
- * @returns (0~59)
1072
+ * @param source - DateTime or Time expression
1073
+ * @returns Second (0~59)
1074
1074
  *
1075
1075
  * @example
1076
1076
  * ```typescript
@@ -1090,12 +1090,12 @@ export const expr = {
1090
1090
  },
1091
1091
 
1092
1092
  /**
1093
- * ISO 주차 추출
1093
+ * Extract ISO week number
1094
1094
  *
1095
- * ISO 8601 기준 주차 (월요일 start, 1~53)
1095
+ * ISO 8601 week number (starts Monday, 1~53)
1096
1096
  *
1097
1097
  * @param source - DateOnly expression
1098
- * @returns ISO 주차 번호
1098
+ * @returns ISO week number
1099
1099
  *
1100
1100
  * @example
1101
1101
  * ```typescript
@@ -1115,19 +1115,19 @@ export const expr = {
1115
1115
  },
1116
1116
 
1117
1117
  /**
1118
- * ISO 시작일 (월요일)
1118
+ * ISO week start date (Monday)
1119
1119
  *
1120
- * 해당 Date가 속한 주의 월요일 return
1120
+ * Returns the Monday of the week the given date belongs to
1121
1121
  *
1122
1122
  * @param source - DateOnly expression
1123
- * @returns 주의 start Date (월요일)
1123
+ * @returns Week start date (Monday)
1124
1124
  *
1125
1125
  * @example
1126
1126
  * ```typescript
1127
1127
  * db.order().select((o) => ({
1128
1128
  * weekStart: expr.isoWeekStartDate(o.orderDate),
1129
1129
  * }))
1130
- * // 2024-01-10 () → 2024-01-08 ()
1130
+ * // 2024-01-10 (Wed) → 2024-01-08 (Mon)
1131
1131
  * ```
1132
1132
  */
1133
1133
  isoWeekStartDate<T extends DateOnly | undefined>(source: ExprUnit<T>): ExprUnit<T> {
@@ -1138,12 +1138,12 @@ export const expr = {
1138
1138
  },
1139
1139
 
1140
1140
  /**
1141
- * ISO 연월 (해당 월의 1일)
1141
+ * ISO year-month (first day of the month)
1142
1142
  *
1143
- * 해당 Date의 첫째 return
1143
+ * Returns the first day of the month for the given date
1144
1144
  *
1145
1145
  * @param source - DateOnly expression
1146
- * @returns 월의 첫째
1146
+ * @returns First day of the month
1147
1147
  *
1148
1148
  * @example
1149
1149
  * ```typescript
@@ -1161,12 +1161,12 @@ export const expr = {
1161
1161
  },
1162
1162
 
1163
1163
  /**
1164
- * Date 차이 계산 (DATEDIFF)
1164
+ * Calculate date difference (DATEDIFF)
1165
1165
  *
1166
- * @param unit - 단위 ("year", "month", "day", "hour", "minute", "second")
1167
- * @param from - start Date
1168
- * @param to - Date
1169
- * @returns 차이 value (to - from)
1166
+ * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1167
+ * @param from - Start date
1168
+ * @param to - End date
1169
+ * @returns Difference value (to - from)
1170
1170
  *
1171
1171
  * @example
1172
1172
  * ```typescript
@@ -1190,12 +1190,12 @@ export const expr = {
1190
1190
  },
1191
1191
 
1192
1192
  /**
1193
- * Date 더하기 (DATEADD)
1193
+ * Add to date (DATEADD)
1194
1194
  *
1195
- * @param unit - 단위 ("year", "month", "day", "hour", "minute", "second")
1196
- * @param source - 원본 Date
1197
- * @param value - 더할 value (음수 가능)
1198
- * @returns 계산된 Date
1195
+ * @param unit - Unit ("year", "month", "day", "hour", "minute", "second")
1196
+ * @param source - Original date
1197
+ * @param value - Value to add (negative allowed)
1198
+ * @returns Calculated date
1199
1199
  *
1200
1200
  * @example
1201
1201
  * ```typescript
@@ -1219,13 +1219,13 @@ export const expr = {
1219
1219
  },
1220
1220
 
1221
1221
  /**
1222
- * Date 포맷 (DATE_FORMAT)
1222
+ * Date format (DATE_FORMAT)
1223
1223
  *
1224
- * DBMS별로 포맷 문자열 규칙이 다를 있음
1224
+ * Format string rules may differ between DBMS implementations
1225
1225
  *
1226
1226
  * @param source - Date expression
1227
- * @param format - 포맷 문자열 (예: "%Y-%m-%d")
1228
- * @returns 포맷된 문자열 expression
1227
+ * @param format - Format string (e.g., "%Y-%m-%d")
1228
+ * @returns Formatted string expression
1229
1229
  *
1230
1230
  * @example
1231
1231
  * ```typescript
@@ -1252,12 +1252,12 @@ export const expr = {
1252
1252
  //#region ========== SELECT - Condition ==========
1253
1253
 
1254
1254
  /**
1255
- * NULL 대체 (COALESCE/IFNULL)
1255
+ * NULL replacement (COALESCE/IFNULL)
1256
1256
  *
1257
- * 번째 non-null 값을 return. 마지막 인자가 non-nullable이면 결과도 non-nullable
1257
+ * Returns the first non-null value. If the last argument is non-nullable, the result is also non-nullable
1258
1258
  *
1259
- * @param args - Inspect할 값들 (마지막은 Default value)
1260
- * @returns 번째 non-null value
1259
+ * @param args - Values to inspect (last is default value)
1260
+ * @returns First non-null value
1261
1261
  *
1262
1262
  * @example
1263
1263
  * ```typescript
@@ -1270,18 +1270,18 @@ export const expr = {
1270
1270
  coalesce,
1271
1271
 
1272
1272
  /**
1273
- * 특정 값이면 NULL return (NULLIF)
1273
+ * Return NULL if value matches (NULLIF)
1274
1274
  *
1275
- * source === value 이면 NULL return, 아니면 source return
1275
+ * Returns NULL if source === value, otherwise returns source
1276
1276
  *
1277
- * @param source - 원본 value
1278
- * @param value - 비교할 value
1279
- * @returns NULL 또는 원본 value
1277
+ * @param source - Original value
1278
+ * @param value - Value to compare
1279
+ * @returns NULL or original value
1280
1280
  *
1281
1281
  * @example
1282
1282
  * ```typescript
1283
1283
  * db.user().select((u) => ({
1284
- * // 문자열을 NULL로 Transform
1284
+ * // Convert empty string to NULL
1285
1285
  * bio: expr.nullIf(u.bio, ""),
1286
1286
  * }))
1287
1287
  * // SELECT NULLIF(bio, '') AS bio
@@ -1299,11 +1299,11 @@ export const expr = {
1299
1299
  },
1300
1300
 
1301
1301
  /**
1302
- * WHERE 표현식을 boolean으로 Transform
1302
+ * Transform WHERE expression to boolean
1303
1303
  *
1304
- * SELECT 절에서 condition 결과를 boolean column으로 사용할 사용
1304
+ * Used when condition results should be used as a boolean column in SELECT clause
1305
1305
  *
1306
- * @param condition - Transform할 condition
1306
+ * @param condition - Condition to transform
1307
1307
  * @returns boolean expression
1308
1308
  *
1309
1309
  * @example
@@ -1324,7 +1324,7 @@ export const expr = {
1324
1324
  /**
1325
1325
  * CASE WHEN expression builder
1326
1326
  *
1327
- * 체이닝 방식으로 condition 분기를 구성
1327
+ * Build conditional branches using method chaining
1328
1328
  *
1329
1329
  * @returns SwitchExprBuilder instance
1330
1330
  *
@@ -1345,12 +1345,12 @@ export const expr = {
1345
1345
  },
1346
1346
 
1347
1347
  /**
1348
- * 단순 IF condition (삼항 operator)
1348
+ * Simple IF condition (ternary operator)
1349
1349
  *
1350
1350
  * @param condition - Condition
1351
- * @param then - Condition이 참일 value
1352
- * @param else_ - Condition이 거짓일 value
1353
- * @returns 조건부 value expression
1351
+ * @param then - Value when condition is true
1352
+ * @param else_ - Value when condition is false
1353
+ * @returns Conditional value expression
1354
1354
  *
1355
1355
  * @example
1356
1356
  * ```typescript
@@ -1366,7 +1366,7 @@ export const expr = {
1366
1366
  else_: ExprInput<T>,
1367
1367
  ): ExprUnit<T> {
1368
1368
  const allValues = [then, else_];
1369
- // 1. ExprUnit에서 dataType 찾기
1369
+ // 1. Find dataType from ExprUnit
1370
1370
  const exprUnit = allValues.find((v): v is ExprUnit<T> => v instanceof ExprUnit);
1371
1371
  if (exprUnit) {
1372
1372
  return new ExprUnit(exprUnit.dataType, {
@@ -1377,7 +1377,7 @@ export const expr = {
1377
1377
  });
1378
1378
  }
1379
1379
 
1380
- // 2. non-null 리터럴에서 추론
1380
+ // 2. Infer from non-null literal
1381
1381
  const nonNullLiteral = allValues.find((v) => v != null) as ColumnPrimitive;
1382
1382
  if (nonNullLiteral == null) {
1383
1383
  throw new Error("At least one of if's then/else must be non-null.");
@@ -1394,21 +1394,21 @@ export const expr = {
1394
1394
  //#endregion
1395
1395
 
1396
1396
  //#region ========== SELECT - Aggregate ==========
1397
- // SUM, AVG, MAX등의 집계는 모든 값이 NULL이거나 행이 없을 때만 NULL return (값이 NULL 행은 무시함)
1397
+ // Aggregates like SUM, AVG, MAX return NULL only when all values are NULL or no rows exist (rows with NULL values are ignored)
1398
1398
 
1399
1399
  /**
1400
- * row 카운트 (COUNT)
1400
+ * Count rows (COUNT)
1401
1401
  *
1402
- * @param arg - 카운트할 column (생략 전체 row 수)
1403
- * @param distinct - true 중복 Remove
1404
- * @returns row
1402
+ * @param arg - Column to count (all rows if omitted)
1403
+ * @param distinct - If true, remove duplicates
1404
+ * @returns Row count
1405
1405
  *
1406
1406
  * @example
1407
1407
  * ```typescript
1408
- * // 전체 row
1408
+ * // Total row count
1409
1409
  * db.user().select(() => ({ total: expr.count() }))
1410
1410
  *
1411
- * // 중복 Remove 카운트
1411
+ * // Distinct count
1412
1412
  * db.order().select((o) => ({
1413
1413
  * uniqueCustomers: expr.count(o.customerId, true),
1414
1414
  * }))
@@ -1423,12 +1423,12 @@ export const expr = {
1423
1423
  },
1424
1424
 
1425
1425
  /**
1426
- * 합계 (SUM)
1426
+ * Sum (SUM)
1427
1427
  *
1428
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
1428
+ * NULL values are ignored. Returns NULL if all values are NULL
1429
1429
  *
1430
- * @param arg - 합계를 구할 Number column
1431
- * @returns 합계 (또는 NULL)
1430
+ * @param arg - Number column to sum
1431
+ * @returns Sum (or NULL)
1432
1432
  *
1433
1433
  * @example
1434
1434
  * ```typescript
@@ -1446,12 +1446,12 @@ export const expr = {
1446
1446
  },
1447
1447
 
1448
1448
  /**
1449
- * 평균 (AVG)
1449
+ * Average (AVG)
1450
1450
  *
1451
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
1451
+ * NULL values are ignored. Returns NULL if all values are NULL
1452
1452
  *
1453
- * @param arg - 평균을 구할 Number column
1454
- * @returns 평균 (또는 NULL)
1453
+ * @param arg - Number column to average
1454
+ * @returns Average (or NULL)
1455
1455
  *
1456
1456
  * @example
1457
1457
  * ```typescript
@@ -1469,12 +1469,12 @@ export const expr = {
1469
1469
  },
1470
1470
 
1471
1471
  /**
1472
- * 최대값 (MAX)
1472
+ * Maximum value (MAX)
1473
1473
  *
1474
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
1474
+ * NULL values are ignored. Returns NULL if all values are NULL
1475
1475
  *
1476
- * @param arg - 최대값을 구할 column
1477
- * @returns 최대값 (또는 NULL)
1476
+ * @param arg - Column to find maximum of
1477
+ * @returns Maximum value (or NULL)
1478
1478
  *
1479
1479
  * @example
1480
1480
  * ```typescript
@@ -1492,12 +1492,12 @@ export const expr = {
1492
1492
  },
1493
1493
 
1494
1494
  /**
1495
- * 최소값 (MIN)
1495
+ * Minimum value (MIN)
1496
1496
  *
1497
- * NULL 값은 무시됨. 모든 값이 NULL이면 NULL return
1497
+ * NULL values are ignored. Returns NULL if all values are NULL
1498
1498
  *
1499
- * @param arg - 최소값을 구할 column
1500
- * @returns 최소값 (또는 NULL)
1499
+ * @param arg - Column to find minimum of
1500
+ * @returns Minimum value (or NULL)
1501
1501
  *
1502
1502
  * @example
1503
1503
  * ```typescript
@@ -1519,10 +1519,10 @@ export const expr = {
1519
1519
  //#region ========== SELECT - Other ==========
1520
1520
 
1521
1521
  /**
1522
- * 여러 value 최대값 (GREATEST)
1522
+ * Greatest value among multiple values (GREATEST)
1523
1523
  *
1524
- * @param args - 비교할 값들
1525
- * @returns 최대값
1524
+ * @param args - Values to compare
1525
+ * @returns Greatest value
1526
1526
  *
1527
1527
  * @example
1528
1528
  * ```typescript
@@ -1540,10 +1540,10 @@ export const expr = {
1540
1540
  },
1541
1541
 
1542
1542
  /**
1543
- * 여러 value 최소값 (LEAST)
1543
+ * Least value among multiple values (LEAST)
1544
1544
  *
1545
- * @param args - 비교할 값들
1546
- * @returns 최소값
1545
+ * @param args - Values to compare
1546
+ * @returns Least value
1547
1547
  *
1548
1548
  * @example
1549
1549
  * ```typescript
@@ -1561,9 +1561,9 @@ export const expr = {
1561
1561
  },
1562
1562
 
1563
1563
  /**
1564
- * row 번호 (ROW_NUMBER 없이 전체 행에 대한 순번)
1564
+ * Row number (sequential number for all rows without ROW_NUMBER)
1565
1565
  *
1566
- * @returns row 번호 (1부터 start)
1566
+ * @returns Row number (starting from 1)
1567
1567
  *
1568
1568
  * @example
1569
1569
  * ```typescript
@@ -1580,15 +1580,15 @@ export const expr = {
1580
1580
  },
1581
1581
 
1582
1582
  /**
1583
- * 난수 Generate (RAND/RANDOM)
1583
+ * Generate random number (RAND/RANDOM)
1584
1584
  *
1585
- * 0~1 사이의 난수 return. ORDER BY에서 랜덤 정렬용으로 주로 사용
1585
+ * Returns a random number between 0 and 1. Mainly used for random ordering in ORDER BY
1586
1586
  *
1587
- * @returns 0~1 사이의 난수
1587
+ * @returns Random number between 0 and 1
1588
1588
  *
1589
1589
  * @example
1590
1590
  * ```typescript
1591
- * // 랜덤 sorting
1591
+ * // Random sorting
1592
1592
  * db.user().orderBy(() => expr.random()).limit(10)
1593
1593
  * ```
1594
1594
  */
@@ -1601,9 +1601,9 @@ export const expr = {
1601
1601
  /**
1602
1602
  * type transformation (CAST)
1603
1603
  *
1604
- * @param source - Transform할 expression
1605
- * @param targetType - 대상 data type
1606
- * @returns Transform된 expression
1604
+ * @param source - Expression to transform
1605
+ * @param targetType - Target data type
1606
+ * @returns Transformed expression
1607
1607
  *
1608
1608
  * @example
1609
1609
  * ```typescript
@@ -1625,12 +1625,12 @@ export const expr = {
1625
1625
  },
1626
1626
 
1627
1627
  /**
1628
- * 스칼라 Subquery - SELECT 절에서 단일 value return Subquery
1628
+ * Scalar Subquery - Subquery that returns a single value in SELECT clause
1629
1629
  *
1630
- * Subquery는 반드시 단일 row, 단일 column을 반환해야 함
1630
+ * The subquery must return exactly one row and one column
1631
1631
  *
1632
1632
  * @param dataType - Data type of the returned value
1633
- * @param queryable - 스칼라 값을 반환하는 Queryable
1633
+ * @param queryable - Queryable that returns a scalar value
1634
1634
  * @returns Subquery result expression
1635
1635
  *
1636
1636
  * @example
@@ -1662,12 +1662,12 @@ export const expr = {
1662
1662
  //#region ========== SELECT - Window Functions ==========
1663
1663
 
1664
1664
  /**
1665
- * ROW_NUMBER() - 파티션 row 번호
1665
+ * ROW_NUMBER() - Row number within a partition
1666
1666
  *
1667
- * 파티션 내에서 1부터 시작하는 sequential 번호 부여
1667
+ * Assigns sequential numbers starting from 1 within each partition
1668
1668
  *
1669
1669
  * @param spec - Window spec (partitionBy, orderBy)
1670
- * @returns row 번호 (1부터 start)
1670
+ * @returns Row number (starting from 1)
1671
1671
  *
1672
1672
  * @example
1673
1673
  * ```typescript
@@ -1690,10 +1690,10 @@ export const expr = {
1690
1690
  },
1691
1691
 
1692
1692
  /**
1693
- * RANK() - 파티션 순위 (동점 같은 순위, 다음 순위 건너뜀)
1693
+ * RANK() - Rank within a partition (ties get same rank, next rank is skipped)
1694
1694
  *
1695
1695
  * @param spec - Window spec (partitionBy, orderBy)
1696
- * @returns 순위 (동점 건너뜀: 1, 1, 3)
1696
+ * @returns Rank (skips after ties: 1, 1, 3)
1697
1697
  *
1698
1698
  * @example
1699
1699
  * ```typescript
@@ -1714,10 +1714,10 @@ export const expr = {
1714
1714
  },
1715
1715
 
1716
1716
  /**
1717
- * DENSE_RANK() - 파티션 밀집 순위 (동점 같은 순위, 다음 순위 유지)
1717
+ * DENSE_RANK() - Dense rank within a partition (ties get same rank, next rank is consecutive)
1718
1718
  *
1719
1719
  * @param spec - Window spec (partitionBy, orderBy)
1720
- * @returns 밀집 순위 (동점 연속: 1, 1, 2)
1720
+ * @returns Dense rank (consecutive after ties: 1, 1, 2)
1721
1721
  *
1722
1722
  * @example
1723
1723
  * ```typescript
@@ -1738,15 +1738,15 @@ export const expr = {
1738
1738
  },
1739
1739
 
1740
1740
  /**
1741
- * NTILE(n) - 파티션을 n 그룹으로 split
1741
+ * NTILE(n) - Split partition into n groups
1742
1742
  *
1743
- * @param n - 분할할 그룹
1743
+ * @param n - Number of groups to split into
1744
1744
  * @param spec - Window spec (partitionBy, orderBy)
1745
- * @returns 그룹 번호 (1 ~ n)
1745
+ * @returns Group number (1 ~ n)
1746
1746
  *
1747
1747
  * @example
1748
1748
  * ```typescript
1749
- * // 상위 25%를 찾기 위한 사분위 split
1749
+ * // Quartile split to find top 25%
1750
1750
  * db.user().select((u) => ({
1751
1751
  * name: u.name,
1752
1752
  * quartile: expr.ntile(4, {
@@ -1764,12 +1764,12 @@ export const expr = {
1764
1764
  },
1765
1765
 
1766
1766
  /**
1767
- * LAG() - 이전 행의 value 참조
1767
+ * LAG() - Reference value from a previous row
1768
1768
  *
1769
- * @param column - column to reference
1769
+ * @param column - Column to reference
1770
1770
  * @param spec - Window spec (partitionBy, orderBy)
1771
- * @param options - offset (Basic 1), default (이전 행이 없을 Default value)
1772
- * @returns 이전 행의 value (또는 Default value/NULL)
1771
+ * @param options - offset (default 1), default (default value when no previous row)
1772
+ * @returns Previous row's value (or default value/NULL)
1773
1773
  *
1774
1774
  * @example
1775
1775
  * ```typescript
@@ -1801,12 +1801,12 @@ export const expr = {
1801
1801
  },
1802
1802
 
1803
1803
  /**
1804
- * LEAD() - 다음 행의 value 참조
1804
+ * LEAD() - Reference value from a following row
1805
1805
  *
1806
- * @param column - column to reference
1806
+ * @param column - Column to reference
1807
1807
  * @param spec - Window spec (partitionBy, orderBy)
1808
- * @param options - offset (Basic 1), default (다음 행이 없을 Default value)
1809
- * @returns 다음 행의 value (또는 Default value/NULL)
1808
+ * @param options - offset (default 1), default (default value when no following row)
1809
+ * @returns Following row's value (or default value/NULL)
1810
1810
  *
1811
1811
  * @example
1812
1812
  * ```typescript
@@ -1838,11 +1838,11 @@ export const expr = {
1838
1838
  },
1839
1839
 
1840
1840
  /**
1841
- * FIRST_VALUE() - 파티션/프레임의 번째 value
1841
+ * FIRST_VALUE() - First value in the partition/frame
1842
1842
  *
1843
- * @param column - column to reference
1843
+ * @param column - Column to reference
1844
1844
  * @param spec - Window spec (partitionBy, orderBy)
1845
- * @returns 번째 value
1845
+ * @returns First value
1846
1846
  *
1847
1847
  * @example
1848
1848
  * ```typescript
@@ -1867,11 +1867,11 @@ export const expr = {
1867
1867
  },
1868
1868
 
1869
1869
  /**
1870
- * LAST_VALUE() - 파티션/프레임의 마지막 value
1870
+ * LAST_VALUE() - Last value in the partition/frame
1871
1871
  *
1872
- * @param column - column to reference
1872
+ * @param column - Column to reference
1873
1873
  * @param spec - Window spec (partitionBy, orderBy)
1874
- * @returns 마지막 value
1874
+ * @returns Last value
1875
1875
  *
1876
1876
  * @example
1877
1877
  * ```typescript
@@ -1896,15 +1896,15 @@ export const expr = {
1896
1896
  },
1897
1897
 
1898
1898
  /**
1899
- * SUM() OVER - Window 합계
1899
+ * SUM() OVER - Window sum
1900
1900
  *
1901
- * @param column - 합계를 구할 column
1901
+ * @param column - Column to sum
1902
1902
  * @param spec - Window spec (partitionBy, orderBy)
1903
- * @returns Window 합계
1903
+ * @returns Sum within window
1904
1904
  *
1905
1905
  * @example
1906
1906
  * ```typescript
1907
- * // 누적 합계
1907
+ * // Running total
1908
1908
  * db.order().select((o) => ({
1909
1909
  * ...o,
1910
1910
  * runningTotal: expr.sumOver(o.amount, {
@@ -1923,15 +1923,15 @@ export const expr = {
1923
1923
  },
1924
1924
 
1925
1925
  /**
1926
- * AVG() OVER - Window 평균
1926
+ * AVG() OVER - Window average
1927
1927
  *
1928
- * @param column - 평균을 구할 column
1928
+ * @param column - Column to average
1929
1929
  * @param spec - Window spec (partitionBy, orderBy)
1930
- * @returns Window 평균
1930
+ * @returns Average within window
1931
1931
  *
1932
1932
  * @example
1933
1933
  * ```typescript
1934
- * // move 평균
1934
+ * // Moving average
1935
1935
  * db.stock().select((s) => ({
1936
1936
  * ...s,
1937
1937
  * movingAvg: expr.avgOver(s.price, {
@@ -1950,11 +1950,11 @@ export const expr = {
1950
1950
  },
1951
1951
 
1952
1952
  /**
1953
- * COUNT() OVER - Window 카운트
1953
+ * COUNT() OVER - Window count
1954
1954
  *
1955
1955
  * @param spec - Window spec (partitionBy, orderBy)
1956
- * @param column - 카운트할 column (생략 전체 row 수)
1957
- * @returns Window row
1956
+ * @param column - Column to count (all rows if omitted)
1957
+ * @returns Row count within window
1958
1958
  *
1959
1959
  * @example
1960
1960
  * ```typescript
@@ -1975,11 +1975,11 @@ export const expr = {
1975
1975
  },
1976
1976
 
1977
1977
  /**
1978
- * MIN() OVER - Window 최소값
1978
+ * MIN() OVER - Window minimum
1979
1979
  *
1980
- * @param column - 최소값을 구할 column
1980
+ * @param column - Column to find minimum of
1981
1981
  * @param spec - Window spec (partitionBy, orderBy)
1982
- * @returns Window 최소값
1982
+ * @returns Minimum value within window
1983
1983
  *
1984
1984
  * @example
1985
1985
  * ```typescript
@@ -2003,11 +2003,11 @@ export const expr = {
2003
2003
  },
2004
2004
 
2005
2005
  /**
2006
- * MAX() OVER - Window 최대값
2006
+ * MAX() OVER - Window maximum
2007
2007
  *
2008
- * @param column - 최대값을 구할 column
2008
+ * @param column - Column to find maximum of
2009
2009
  * @param spec - Window spec (partitionBy, orderBy)
2010
- * @returns Window 최대값
2010
+ * @returns Maximum value within window
2011
2011
  *
2012
2012
  * @example
2013
2013
  * ```typescript
@@ -2035,9 +2035,9 @@ export const expr = {
2035
2035
  //#region ========== Helper ==========
2036
2036
 
2037
2037
  /**
2038
- * ExprInput Expr Transform (내부용)
2038
+ * Transform ExprInput to Expr (internal use)
2039
2039
  *
2040
- * @param value - Transform할 value
2040
+ * @param value - Value to transform
2041
2041
  * @returns Expr JSON AST
2042
2042
  */
2043
2043
  toExpr(value: ExprInput<ColumnPrimitive>): Expr {
@@ -2049,7 +2049,7 @@ export const expr = {
2049
2049
 
2050
2050
  //#region ========== Internal Helpers ==========
2051
2051
 
2052
- // 여러 value 첫 번째 non-null return (COALESCE)
2052
+ // Return the first non-null value among multiple values (COALESCE)
2053
2053
  function coalesce<TPrimitive extends ColumnPrimitive>(
2054
2054
  ...args: [
2055
2055
  ExprInput<TPrimitive | undefined>,
@@ -2071,7 +2071,7 @@ function coalesce<TPrimitive extends ColumnPrimitive>(
2071
2071
 
2072
2072
  function createSwitchBuilder<TPrimitive extends ColumnPrimitive>(): SwitchExprBuilder<TPrimitive> {
2073
2073
  const cases: { when: WhereExpr; then: Expr }[] = [];
2074
- const thenValues: ExprInput<TPrimitive>[] = []; // then 값들 저장
2074
+ const thenValues: ExprInput<TPrimitive>[] = []; // Store then values
2075
2075
 
2076
2076
  return {
2077
2077
  case(condition: WhereExprUnit, then: ExprInput<TPrimitive>): typeof this {
@@ -2084,7 +2084,7 @@ function createSwitchBuilder<TPrimitive extends ColumnPrimitive>(): SwitchExprBu
2084
2084
  },
2085
2085
  default(value: ExprInput<TPrimitive>): ExprUnit<TPrimitive> {
2086
2086
  const allValues = [...thenValues, value];
2087
- // 1. ExprUnit에서 dataType 찾기
2087
+ // 1. Find dataType from ExprUnit
2088
2088
  const exprUnit = allValues.find((v): v is ExprUnit<TPrimitive> => v instanceof ExprUnit);
2089
2089
  if (exprUnit) {
2090
2090
  return new ExprUnit(exprUnit.dataType, {
@@ -2094,7 +2094,7 @@ function createSwitchBuilder<TPrimitive extends ColumnPrimitive>(): SwitchExprBu
2094
2094
  });
2095
2095
  }
2096
2096
 
2097
- // 2. non-null 리터럴에서 추론
2097
+ // 2. Infer from non-null literal
2098
2098
  const nonNullLiteral = allValues.find((v) => v != null) as ColumnPrimitive;
2099
2099
  if (nonNullLiteral == null) {
2100
2100
  throw new Error("At least one of switch's case/default must be non-null.");