Skip to content

Commit 63e2699

Browse files
committed
Update document for v1.2.8
1 parent 9a4bae2 commit 63e2699

File tree

11 files changed

+214
-20
lines changed

11 files changed

+214
-20
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# SQL2Excel Version History
22

3+
## v1.2.8 - Language Configuration & Type Safety Improvements (2025-10-19)
4+
5+
### 🔧 Improvements
6+
- **Unified Language Configuration**: Standardized language settings using environment variable (`LANGUAGE`)
7+
- `app.js`: Use environment variable instead of command-line argument
8+
- `src/index.js`: Environment variable-based language configuration
9+
- `src/excel-cli.js`: Use environment variable, changed default from 'kr' to 'en'
10+
- `src/excel-style-helper.js`: Use environment variable
11+
- `src/file-utils.js`: Use environment variable
12+
- `src/style-manager.js`: Use environment variable
13+
- `src/variable-processor.js`: Use environment variable
14+
- `src/query-parser.js`: Use environment variable
15+
- `src/excel-generator.js`: Use environment variable
16+
17+
- **Batch File Improvements**: Added environment variable settings, removed `--lang` parameter
18+
- `run.bat`: Added `set LANGUAGE=en`
19+
- `실행하기.bat`: Added `set LANGUAGE=kr`
20+
- `create-release.js`: Added environment variable settings to release batch file templates
21+
- `package.json`: Changed `start:kr` script to message directing users to use batch files
22+
23+
### 🐛 Bug Fixes
24+
- **Type Conversion Error Fix**: Improved type safety when handling empty arrays in IN clauses
25+
- `src/mssql-helper.js`: `createInClause()` function now returns `NULL` instead of `'^-_'`
26+
- `src/variable-processor.js`: Unresolved dynamic variables replaced with `NULL` instead of `'^-_'`
27+
- **Issue**: Type conversion error when executing `WHERE OrderID IN ('^-_')` on INT columns
28+
- **Solution**: Using `WHERE OrderID IN (NULL)` works safely with all data types
29+
- **Impact**: Executes without errors on all column types (numeric, string, date, etc.) and always returns 0 rows
30+
31+
### 📝 Documentation
32+
- Enhanced multilingual messages
33+
- `variable-processor.js`: Shows `(no match)` / `(매칭 없음)` message when replacing with NULL
34+
- Clarified messages when replacing with empty strings
35+
36+
### 🔄 Migration Guide
37+
- If you were running with `node app.js --lang=kr`:
38+
- Windows: `set LANGUAGE=kr && node app.js`
39+
- Or use `실행하기.bat` (automatically sets environment variable)
40+
- In development environment, you can set `LANGUAGE=kr` in `.env` file
41+
342
## v1.2.7 - Encoding & Validation Improvements (2025-10-16)
443

544
### 🔧 Improvements

CHANGELOG_KR.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# SQL2Excel 버전 히스토리
22

3+
## v1.2.8 - 언어 설정 개선 및 타입 안정성 향상 (2025-10-19)
4+
5+
### 🔧 개선사항
6+
- **언어 설정 통일**: 모든 모듈에서 환경 변수(`LANGUAGE`)로 언어 설정 통일
7+
- `app.js`: 명령줄 인수 대신 환경 변수 사용
8+
- `src/index.js`: 환경 변수 기반 언어 설정
9+
- `src/excel-cli.js`: 환경 변수 사용, 기본값 'kr'에서 'en'으로 변경
10+
- `src/excel-style-helper.js`: 환경 변수 사용
11+
- `src/file-utils.js`: 환경 변수 사용
12+
- `src/style-manager.js`: 환경 변수 사용
13+
- `src/variable-processor.js`: 환경 변수 사용
14+
- `src/query-parser.js`: 환경 변수 사용
15+
- `src/excel-generator.js`: 환경 변수 사용
16+
17+
- **배치 파일 개선**: 환경 변수 설정 추가, `--lang` 파라미터 제거
18+
- `run.bat`: `set LANGUAGE=en` 추가
19+
- `실행하기.bat`: `set LANGUAGE=kr` 추가
20+
- `create-release.js`: 릴리스 배치 파일 템플릿에 환경 변수 설정 추가
21+
- `package.json`: `start:kr` 스크립트를 배치 파일 사용 안내 메시지로 변경
22+
23+
### 🐛 버그 수정
24+
- **타입 변환 오류 해결**: IN 절에서 빈 배열 처리 시 타입 안정성 개선
25+
- `src/mssql-helper.js`: `createInClause()` 함수에서 `'^-_'` 대신 `NULL` 반환
26+
- `src/variable-processor.js`: 해결되지 않은 동적 변수를 `'^-_'` 대신 `NULL`로 대체
27+
- **문제**: INT 타입 컬럼에서 `WHERE OrderID IN ('^-_')` 실행 시 타입 변환 오류 발생
28+
- **해결**: `WHERE OrderID IN (NULL)` 사용으로 모든 데이터 타입에서 안전하게 작동
29+
- **효과**: 숫자, 문자열, 날짜 등 모든 타입의 컬럼에서 오류 없이 실행 (항상 0개 행 반환)
30+
31+
### 📝 문서
32+
- 다국어 메시지 개선
33+
- `variable-processor.js`: NULL 대체 시 메시지에 `(매칭 없음)` / `(no match)` 표시
34+
- 빈 문자열 대체 시 메시지 명확화
35+
36+
### 🔄 마이그레이션 가이드
37+
- 기존에 `node app.js --lang=kr` 형태로 실행하던 경우:
38+
- Windows: `set LANGUAGE=kr && node app.js`
39+
- 또는 `실행하기.bat` 사용 (자동으로 환경 변수 설정됨)
40+
- 개발 환경에서는 `.env` 파일에 `LANGUAGE=kr` 설정 가능
41+
342
## v1.2.7 - 인코딩 및 검증 개선 (2025-10-16)
443

544
### 🔧 개선사항

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ npm run build
5656
#### Option B: Standalone Executable
5757
1. Download the release package from the releases section
5858
2. Extract to your desired directory
59-
3. Run `sql2excel.bat` for interactive menu
59+
3. Run interactive menu:
60+
- English: Run `run.bat`
61+
- Korean: Run `실행하기.bat`
6062
4. Or use `sql2excel-v{version}.exe` directly
6163

6264
### 3. Database Connection Setup
@@ -92,11 +94,38 @@ Create `config/dbinfo.json` file:
9294

9395
## 🚀 Basic Usage
9496

97+
### Language Settings
98+
99+
The tool supports Korean and English through environment variables:
100+
101+
#### Development Environment
102+
- **English**: Run `run.bat` (automatically sets `LANGUAGE=en`)
103+
- **Korean**: Run `실행하기.bat` (automatically sets `LANGUAGE=kr`)
104+
105+
#### Release Package
106+
- **English**: Run `run.bat`
107+
- **Korean**: Run `실행하기.bat`
108+
109+
> 💡 **Note**: Language is controlled via the `LANGUAGE` environment variable. Default is English (en).
110+
95111
### Method 1: Interactive Batch File (Recommended for Windows Users)
96112

97-
Run the interactive batch file for a user-friendly menu:
113+
#### Development Environment
98114
```bash
99-
sql2excel.bat
115+
# English version
116+
run.bat
117+
118+
# Korean version
119+
실행하기.bat
120+
```
121+
122+
#### Release Package
123+
```bash
124+
# English version
125+
run.bat
126+
127+
# Korean version
128+
실행하기.bat
100129
```
101130

102131
The interactive menu provides:

README_KR.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ npm run build
5656
#### 옵션 B: 독립 실행 파일
5757
1. 릴리스 섹션에서 릴리스 패키지 다운로드
5858
2. 원하는 디렉토리에 압축 해제
59-
3. 대화형 메뉴를 위해 `sql2excel.bat` 실행
59+
3. 대화형 메뉴 실행:
60+
- 영어: `run.bat` 실행
61+
- 한글: `실행하기.bat` 실행
6062
4. 또는 `sql2excel-v{version}.exe`를 직접 사용
6163

6264
### 3. 데이터베이스 연결 설정
@@ -92,11 +94,38 @@ npm run build
9294

9395
## 🚀 기본 사용법
9496

97+
### 언어 설정
98+
99+
도구는 환경 변수를 통해 한국어와 영어를 지원합니다:
100+
101+
#### 개발 환경
102+
- **영어**: `run.bat` 실행 (자동으로 `LANGUAGE=en` 설정)
103+
- **한글**: `실행하기.bat` 실행 (자동으로 `LANGUAGE=kr` 설정)
104+
105+
#### 배포 환경 (Release Package)
106+
- **영어**: `run.bat` 실행
107+
- **한글**: `실행하기.bat` 실행
108+
109+
> 💡 **참고**: 환경 변수 `LANGUAGE`를 사용하여 언어를 제어합니다. 기본값은 영어(en)입니다.
110+
95111
### 방법 1: 대화형 배치 파일 (Windows 사용자 권장)
96112

97-
사용자 친화적인 메뉴를 위해 대화형 배치 파일 실행:
113+
#### 개발 환경
98114
```bash
99-
sql2excel.bat
115+
# 영어 버전
116+
run.bat
117+
118+
# 한글 버전
119+
실행하기.bat
120+
```
121+
122+
#### 배포 환경 (Release Package)
123+
```bash
124+
# 영어 버전
125+
run.bat
126+
127+
# 한글 버전
128+
실행하기.bat
100129
```
101130

102131
대화형 메뉴 제공 항목:

USER_MANUAL.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ npm run build
7171
#### Option B: Standalone Executable
7272
1. Download the release package from the releases section
7373
2. Extract to your desired directory
74-
3. Run `sql2excel.bat` for interactive menu
74+
3. Run interactive menu:
75+
- English: Run `run.bat`
76+
- Korean: Run `실행하기.bat`
7577
4. Or use `sql2excel-v{version}.exe` directly
7678

7779
### 3. Database Connection Setup
@@ -107,11 +109,38 @@ Create `config/dbinfo.json` file:
107109

108110
## 🚀 Basic Usage
109111

112+
### Language Settings
113+
114+
The tool supports Korean and English through environment variables:
115+
116+
#### Development Environment
117+
- **English**: Run `run.bat` (automatically sets `LANGUAGE=en`)
118+
- **Korean**: Run `실행하기.bat` (automatically sets `LANGUAGE=kr`)
119+
120+
#### Release Package
121+
- **English**: Run `run.bat`
122+
- **Korean**: Run `실행하기.bat`
123+
124+
> 💡 **Note**: Language is controlled via the `LANGUAGE` environment variable. Default is English (en).
125+
110126
### Method 1: Interactive Batch File (Recommended for Windows Users)
111127

112-
Run the interactive batch file for a user-friendly menu:
128+
#### Development Environment
113129
```bash
114-
sql2excel.bat
130+
# English version
131+
run.bat
132+
133+
# Korean version
134+
실행하기.bat
135+
```
136+
137+
#### Release Package
138+
```bash
139+
# English version
140+
run.bat
141+
142+
# Korean version
143+
실행하기.bat
115144
```
116145

117146
The interactive menu provides:

USER_MANUAL_KR.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ npm run build
7171
#### 옵션 B: 독립 실행 파일
7272
1. 릴리스 섹션에서 릴리스 패키지 다운로드
7373
2. 원하는 디렉토리에 압축 해제
74-
3. 대화형 메뉴를 위해 `sql2excel.bat` 실행
74+
3. 대화형 메뉴 실행:
75+
- 영어: `run.bat` 실행
76+
- 한글: `실행하기.bat` 실행
7577
4. 또는 `sql2excel-v{version}.exe`를 직접 사용
7678

7779
### 3. 데이터베이스 연결 설정
@@ -107,11 +109,38 @@ npm run build
107109

108110
## 🚀 기본 사용법
109111

112+
### 언어 설정
113+
114+
도구는 환경 변수를 통해 한국어와 영어를 지원합니다:
115+
116+
#### 개발 환경
117+
- **영어**: `run.bat` 실행 (자동으로 `LANGUAGE=en` 설정)
118+
- **한글**: `실행하기.bat` 실행 (자동으로 `LANGUAGE=kr` 설정)
119+
120+
#### 배포 환경 (Release Package)
121+
- **영어**: `run.bat` 실행
122+
- **한글**: `실행하기.bat` 실행
123+
124+
> 💡 **참고**: 환경 변수 `LANGUAGE`를 사용하여 언어를 제어합니다. 기본값은 영어(en)입니다.
125+
110126
### 방법 1: 대화형 배치 파일 (Windows 사용자 권장)
111127

112-
사용자 친화적인 메뉴를 위해 대화형 배치 파일 실행:
128+
#### 개발 환경
113129
```bash
114-
sql2excel.bat
130+
# 영어 버전
131+
run.bat
132+
133+
# 한글 버전
134+
실행하기.bat
135+
```
136+
137+
#### 배포 환경 (Release Package)
138+
```bash
139+
# 영어 버전
140+
run.bat
141+
142+
# 한글 버전
143+
실행하기.bat
115144
```
116145

117146
대화형 메뉴 제공 항목:

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const LANGUAGE = process.env.LANGUAGE || 'en';
2929
// 다국어 메시지
3030
const messages = {
3131
en: {
32-
title: 'SQL2Excel Tool v1.2.7',
32+
title: 'SQL2Excel',
3333
menuTitle: 'Menu Selection',
3434
menu1: '1. Validate Query Definition File',
3535
menu2: '2. Test Database Connection',
@@ -95,7 +95,7 @@ const messages = {
9595
interrupted: 'Interrupted by user'
9696
},
9797
kr: {
98-
title: 'SQL2Excel 도구 v1.2.7',
98+
title: 'SQL2Excel',
9999
menuTitle: '메뉴 선택',
100100
menu1: '1. 쿼리 정의 파일 검증',
101101
menu2: '2. 데이터베이스 연결 테스트',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "sql2excel",
3-
"version": "1.2.7",
3+
"version": "1.2.8",
44
"description": "SQL 쿼리 결과를 엑셀 파일로 저장하는 도구 (시트별 쿼리, 변수, XML/JSON 지원)",
55
"main": "app.js",
66
"scripts": {
77
"start": "node app.js",
8-
"start:kr": "node app.js --lang=kr",
8+
"start:kr": "echo Please use 실행하기.bat for Korean language",
99
"export": "node src/excel-cli.js export",
1010
"validate": "node src/excel-cli.js validate",
1111
"list-dbs": "node src/excel-cli.js list-dbs",

run.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ color 0F
66

77
echo.
88
echo ================================================================
9-
echo SQL2Excel Tool v1.2.7
9+
echo SQL2Excel
1010
echo ================================================================
1111
echo.
1212

src/excel-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const messages = {
1515
sheetNameWhitespace: 'Sheet name has leading or trailing whitespace.',
1616

1717
helpMessage: `
18-
SQL2Excel Tool v1.2
18+
SQL2Excel
1919
Usage: node src/excel-cli.js <command> [options]
2020
2121
Commands:
@@ -126,7 +126,7 @@ const messages = {
126126
sheetNameWhitespace: '시트명 앞뒤에 공백이 있습니다.',
127127

128128
helpMessage:
129-
`SQL2Excel 도구 v1.2
129+
`SQL2Excel
130130
사용법: node src/excel-cli.js <명령> [옵션]',
131131
명령:',
132132
export SQL 쿼리 결과를 엑셀 파일로 내보내기',

0 commit comments

Comments
 (0)