reltype 0.1.4 → 0.1.6
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.
- package/CHANGELOG.md +83 -3
- package/README.ko.md +517 -623
- package/README.md +511 -623
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,87 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## [0.1.
|
|
9
|
+
## [0.1.5] — 2026-03-19
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- `README.md` — 프로젝트 소개 전면 개편, Prisma/TypeORM/Drizzle 비교표 추가, FAQ 및 사용 시나리오 보강, 대용량/에러처리/풀 설정 가이드 상세화
|
|
13
|
+
- `README.ko.md` — 한국어 문서 동일 수준으로 전면 개편 (비교표, FAQ, 운영 가이드 포함)
|
|
14
|
+
- `CHANGELOG.md` — 0.1.1 ~ 0.1.4 릴리즈 내역 소급 작성 및 설명 보강
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [0.1.4] — 2026-03-19
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- `package.json` / `package-lock.json` — 버전 범프 (0.1.3 → 0.1.4)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## [0.1.3] — 2026-03-19
|
|
26
|
+
|
|
27
|
+
### Fixed (refactor: type info)
|
|
28
|
+
|
|
29
|
+
#### Query Guard — 빈 입력 방어 로직 추가
|
|
30
|
+
- `buildInsert` — 삽입할 데이터가 없을 때 `logger.error` 출력 후 no-op 반환
|
|
31
|
+
- `buildUpdate` — 수정 데이터 없음 / WHERE 조건 없음 각각 감지 후 no-op 반환 (전체 업데이트 방지)
|
|
32
|
+
- `buildDelete` — WHERE 조건 없음 감지 후 no-op 반환 (전체 삭제 방지), `RETURNING *` 추가
|
|
33
|
+
- `buildUpsert` — 삽입 데이터 없음 감지 후 no-op 반환, 충돌 컬럼만 있을 경우 `DO NOTHING` 처리
|
|
34
|
+
- `buildBulkInsert` — 빈 배열 및 첫 row 데이터 없음 감지 후 no-op 반환
|
|
35
|
+
|
|
36
|
+
#### QueryBuilder — 안정성 개선
|
|
37
|
+
- `one()` — `this._limitVal` 직접 변이 제거 → `clone()`으로 원본 불변 처리
|
|
38
|
+
- `paginate()` — `Promise.all` 제거, 같은 클라이언트에서 COUNT → DATA 순차 실행
|
|
39
|
+
- `cursorPaginate()` — 잘못된 cursor 토큰 시 `logger.error` 출력 후 빈 결과 반환 (cursor 값 메시지 노출 제거)
|
|
40
|
+
- `clone()` — `_execHooks` 복사 누락 수정
|
|
41
|
+
|
|
42
|
+
#### BaseRepo — 일관성 개선
|
|
43
|
+
- `exec()` — 빈 SQL 진입 시 `logger.error` 후 즉시 `[]` 반환 (no-op 계층 추가)
|
|
44
|
+
- `delete()` — 내부 `withClient` 직접 호출 제거, `exec()` 재사용으로 로깅 일관성 확보
|
|
45
|
+
- `selectOne()` — 글로벌 훅(`useHooks`) 자동 적용되도록 수정 (`this.select(where).one()` 위임)
|
|
46
|
+
- `findPkKey()` — primary key 미정의 시 조용한 fallback 대신 `logger.warn` 출력
|
|
47
|
+
|
|
48
|
+
#### Schema / Column
|
|
49
|
+
- `Col` — `isDefaultNow: boolean` 필드 추가로 `default()` / `defaultNow()` 의미 구분
|
|
50
|
+
- `Col.nullable()` / `notNull()` / `primaryKey()` — `isDefaultNow` 상태 올바르게 전파
|
|
51
|
+
- `toSnake()` — 두문자어(Acronym) 처리 개선 (정규식 2단계 적용)
|
|
52
|
+
- `URLParam` → `url_param` ✓ / `userID` → `user_id` ✓
|
|
53
|
+
|
|
54
|
+
#### Connection Pool
|
|
55
|
+
- `PoolStatus` — `isInitialized: boolean` 필드 추가
|
|
56
|
+
- `getPoolStatus()` — pool 미초기화 시 `isHealthy: false` 반환 (이전: `true`)
|
|
57
|
+
- `readPoolStatus()` — `isHealthy` 조건 개선: `!(waitingCount > 0 && idleCount === 0)` (pool 소진 상태만 unhealthy)
|
|
58
|
+
|
|
59
|
+
#### Package
|
|
60
|
+
- `dotenv` — `dependencies` → `devDependencies` 이동 (라이브러리 소비자 의존성 오염 방지)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## [0.1.2] — 2026-03-19
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
- `package.json` / `package-lock.json` — 버전 범프 (0.1.1 → 0.1.2)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## [0.1.1] — 2026-03-19
|
|
72
|
+
|
|
73
|
+
### Added (feat: add schema selection for database connection)
|
|
74
|
+
- `defineTable` — PostgreSQL 스키마 지원 추가
|
|
75
|
+
- `defineTable('audit.activity_logs', cols)` — dot 표기법
|
|
76
|
+
- `defineTable('users', cols, { schema: 'auth' })` — 명시적 옵션
|
|
77
|
+
- `qualifiedName` 자동 생성 (`"auth"."users"` 형태로 SQL 식별자 인용)
|
|
78
|
+
- `TableOpts` 인터페이스 추가 (`{ schema?: string }`)
|
|
79
|
+
- `TableDef` — `qualifiedName` 필드 추가
|
|
80
|
+
- `src/index.ts` — `TableOpts` re-export 추가
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
- `package.json` — `pg` → `peerDependencies` 이동, `express` / `nodemon` / `typescript` → `devDependencies` 이동
|
|
84
|
+
- `main`, `types`, `exports`, `files`, `keywords`, `repository`, `engines` 필드 추가로 npm 배포 최적화
|
|
85
|
+
- `scripts` — `typecheck`, `prepublishOnly` 추가
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## [0.1.0] — 2026-03-19
|
|
10
90
|
|
|
11
91
|
### Added
|
|
12
92
|
|
|
@@ -22,7 +102,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
22
102
|
- `.exec()` — 쿼리 실행 → `T[]`
|
|
23
103
|
- `.one()` — 단건 실행 → `T | null`
|
|
24
104
|
- `.calculate(fns)` — COUNT / SUM / AVG / MIN / MAX 집계
|
|
25
|
-
- `.paginate(opts)` — OFFSET 기반 페이지네이션
|
|
105
|
+
- `.paginate(opts)` — OFFSET 기반 페이지네이션
|
|
26
106
|
- `.toSQL()` — 생성될 SQL 미리 확인 (디버깅용)
|
|
27
107
|
- `QueryBuilder.raw(sql, params?)` — 독립 Raw SQL 실행
|
|
28
108
|
|
|
@@ -53,7 +133,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
53
133
|
|
|
54
134
|
---
|
|
55
135
|
|
|
56
|
-
## [0.0.1] —
|
|
136
|
+
## [0.0.1] — 2026-02-13
|
|
57
137
|
|
|
58
138
|
### Added
|
|
59
139
|
- `defineTable` / `col` — 테이블 스키마 정의 및 타입 추론 (`InferRow`, `InferInsert`, `InferUpdate`)
|