Skip to content

Commit aef2c3e

Browse files
committed
Update document for v2.1.5
1 parent f1a2de7 commit aef2c3e

7 files changed

Lines changed: 109 additions & 13 deletions

File tree

CHANGELOG.md

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

3+
## v2.1.5-beta(v1.3.5) - DynamicVar DB Routing & XML Validation Update (2025-11-15)
4+
5+
### ✨ New/Changed
6+
- Dynamic variable DB routing
7+
- XML `dynamicVar` supports `db` (alias of `database`) attribute
8+
- Each dynamic variable is executed using the adapter for its specified DB key
9+
- Fallback to default DB when not specified
10+
- XML validation update
11+
- `queryDef` now allows `db` attribute during structure validation (for documentation/future use). Execution DB remains sheet-level `db` or global default
12+
13+
### 🔧 Code Changes
14+
- `src/query-parser.js`
15+
- Allow `db` attribute on `dynamicVar`; parse `database || db`
16+
- Allow `db` attribute on `queryDef` in validation
17+
- `src/variable-processor.js`
18+
- Execute dynamic variables on their own DB adapters (`dbAdapters[targetDbKey]`)
19+
- `src/index.js`
20+
- Pass `dbAdapters` and `defaultDbKey` to dynamic variable processor
21+
22+
### 📝 Documentation
23+
- README/README_KR: Added v2.1.5 highlights, dynamicVar `db`/`database` usage notes and examples
24+
- USER_MANUAL/USER_MANUAL_KR: Documented dynamicVar attributes and per-variable DB routing
25+
- CHANGELOG/CHANGELOG_KR: Added v2.1.5 entries
26+
327
## v2.1.4-beta(v1.3.4) - DB Adapter Test Query & Schema Alignment (2025-11-08)
428

529
### ✨ New/Changed

CHANGELOG_KR.md

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

3+
## v2.1.5-beta(v1.3.5) - 동적 변수 DB 라우팅 & XML 검증 업데이트 (2025-11-15)
4+
5+
### ✨ 변경 사항
6+
- 동적 변수 DB 라우팅
7+
- XML `dynamicVar`에서 `db` 속성 지원 (`database`의 별칭)
8+
- 각 동적 변수는 지정된 DB 키의 어댑터로 실행
9+
- 미지정 시 전역 기본 DB로 폴백
10+
- XML 검증 업데이트
11+
- XML 구조 검증에서 `queryDef``db` 속성을 허용 (문서/향후 확장용). 실제 실행 DB는 시트의 `db` 또는 전역 기본 DB가 적용됨
12+
13+
### 🔧 코드 변경
14+
- `src/query-parser.js`
15+
- `dynamicVar``db` 속성 허용; 파싱 시 `database || db` 처리
16+
- XML 검증에서 `queryDef``db` 속성 허용
17+
- `src/variable-processor.js`
18+
- 동적 변수를 해당 DB 어댑터로 실행 (`dbAdapters[targetDbKey]`)
19+
- `src/index.js`
20+
- 동적 변수 처리에 `dbAdapters``defaultDbKey` 전달
21+
22+
### 📝 문서
23+
- README/README_KR: v2.1.5 하이라이트, `dynamicVar``db`/`database` 속성 사용 노트 및 예시 추가
24+
- USER_MANUAL/USER_MANUAL_KR: 동적 변수 속성 및 변수별 DB 라우팅 동작 문서화
25+
- CHANGELOG/CHANGELOG_KR: v2.1.5 항목 추가
26+
327
## v2.1.4-beta(v1.3.4) - DB 어댑터 테스트 쿼리 도입 및 스키마 정합성 (2025-11-08)
428

529
### ✨ 변경 사항

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
A Node.js-based tool for generating Excel files from SQL query results.
44

5+
## v2.1.5-beta(v1.3.5) Highlights
6+
7+
- DynamicVar DB routing
8+
- `dynamicVar` now supports `db` (alias of `database`) attribute in XML.
9+
- Each dynamic variable executes on its specified DB adapter (falls back to default DB when omitted).
10+
- XML validation update
11+
- `queryDef` now allows `db` attribute in XML schema validation. Note: current execution still uses sheet-level `db` or global default; `queryDef.db` is for future use/documentation.
12+
513
## v2.1.4-beta(v1.3.4) Highlights
614

715
- Adapter-level DB connection test queries
@@ -110,6 +118,10 @@ node app.js --mode=export --query=./queries/sample-queries.json
110118
node app.js --mode=help
111119
```
112120

121+
Notes:
122+
- Attributes supported on `dynamicVar`: `name`, `description`, `type`, `db`, `database` (`db` is an alias). When both are present, `database` takes precedence.
123+
- `queryDef` accepts `db` for validation purposes; execution DB is determined by sheet's `db` or the global default DB.
124+
113125
#### Standalone EXE
114126
```bash
115127
sql2excel.exe --mode=validate --xml=./queries/sample-queries.xml
@@ -391,15 +403,15 @@ The tool supports dynamic variables that can extract data at runtime and use it
391403

392404
```xml
393405
<!-- Using column_identified (default) -->
394-
<dynamicVar name="customerData" description="Customer information">
406+
<dynamicVar name="customerData" description="Customer information" db="sampleDB">
395407
<![CDATA[
396408
SELECT CustomerID, CustomerName, Region FROM Customers
397409
]]>
398410
<!-- type omitted - defaults to column_identified -->
399411
</dynamicVar>
400412

401413
<!-- Using key_value_pairs -->
402-
<dynamicVar name="statusMapping" description="Status mapping">
414+
<dynamicVar name="statusMapping" description="Status mapping" database="mariaDB">
403415
<![CDATA[
404416
SELECT StatusCode, StatusName FROM StatusCodes
405417
]]>

README_KR.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
SQL 쿼리 결과를 엑셀 파일로 생성하는 Node.js 기반 도구입니다.
44

5+
## v2.1.5-beta(v1.3.5) 하이라이트
6+
7+
- 동적 변수 DB 라우팅
8+
- XML의 `dynamicVar`에서 `db`(= `database` 별칭) 속성 지원.
9+
- 각 동적 변수는 지정한 DB 어댑터에서 실행되며, 미지정 시 기본 DB 사용.
10+
- XML 검증 업데이트
11+
- XML 스키마 검증에서 `queryDef``db` 속성을 허용. 주의: 현재 실행 DB는 시트의 `db` 또는 전역 기본 DB가 사용되며, `queryDef.db`는 향후 문서/확장용.
12+
513
## v2.1.4-beta(v1.3.4) 하이라이트
614

715
- 어댑터별 DB 연결 테스트 쿼리 도입
@@ -110,6 +118,10 @@ node app.js --mode=export --query=./queries/sample-queries.json
110118
node app.js --mode=help
111119
```
112120

121+
참고:
122+
- `dynamicVar`에서 지원하는 속성: `name`, `description`, `type`, `db`, `database` (`db`는 별칭). 둘 다 있으면 `database`가 우선합니다.
123+
- `queryDef`는 검증 목적상 `db`를 허용합니다. 실제 실행 DB는 시트의 `db` 혹은 전역 기본 DB가 사용됩니다.
124+
113125
#### 독립 실행 파일(EXE)
114126
```bash
115127
sql2excel.exe --mode=validate --xml=./queries/sample-queries.xml
@@ -391,15 +403,15 @@ node src/excel-cli.js export --xml ./queries/sales-report.xml \
391403

392404
```xml
393405
<!-- column_identified 사용 (기본값) -->
394-
<dynamicVar name="customerData" description="고객 정보">
406+
<dynamicVar name="customerData" description="고객 정보" db="sampleDB">
395407
<![CDATA[
396408
SELECT CustomerID, CustomerName, Region FROM Customers
397409
]]>
398410
<!-- type 생략 - column_identified가 기본값 -->
399411
</dynamicVar>
400412

401413
<!-- key_value_pairs 사용 -->
402-
<dynamicVar name="statusMapping" description="상태 매핑">
414+
<dynamicVar name="statusMapping" description="상태 매핑" database="mariaDB">
403415
<![CDATA[
404416
SELECT StatusCode, StatusName FROM StatusCodes
405417
]]>

USER_MANUAL.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919

2020
SQL2Excel is a powerful Node.js-based tool for generating Excel files from SQL query results with advanced styling, template support, and standalone executable distribution.
2121

22+
### What's New (v2.1.5-beta, v1.3.5)
23+
24+
- DynamicVar DB routing
25+
- XML `dynamicVar` supports `db` (alias of `database`) attribute
26+
- Each dynamic variable runs on its specified DB adapter; falls back to default DB if omitted
27+
- XML validation update
28+
- `queryDef` accepts `db` in schema validation (execution DB is still determined by sheet `db` or global default)
29+
2230
### What's New (v2.1.4-beta, v1.3.4)
2331

2432
- Adapter-level DB connection test queries
@@ -527,15 +535,15 @@ The tool supports advanced dynamic variables that can extract data at runtime an
527535
#### XML Configuration
528536
```xml
529537
<dynamicVars>
530-
<!-- Using column_identified (default) -->
531-
<dynamicVar name="customerData" description="Customer information">
538+
<!-- Using column_identified (default) on specific DB -->
539+
<dynamicVar name="customerData" description="Customer information" db="sampleDB">
532540
<![CDATA[
533541
SELECT CustomerID, CustomerName, Region FROM Customers
534542
]]>
535543
</dynamicVar>
536544

537-
<!-- Using key_value_pairs -->
538-
<dynamicVar name="productPrices" type="key_value_pairs" description="Product prices">
545+
<!-- Using key_value_pairs on a different DB -->
546+
<dynamicVar name="productPrices" type="key_value_pairs" description="Product prices" database="mariaDB">
539547
<![CDATA[
540548
SELECT ProductID, UnitPrice FROM Products WHERE Discontinued = 0
541549
]]>
@@ -559,6 +567,10 @@ WHERE CustomerID IN (${customerData.CustomerID})
559567
4. **Performance**: Variables are executed once and cached for the entire export
560568
5. **Debug Mode**: Enable with `DEBUG_VARIABLES=true` for detailed variable substitution
561569

570+
Notes:
571+
- Supported `dynamicVar` attributes: `name`, `description`, `type`, `db`, `database` (`db` is an alias). If both are present, `database` takes precedence.
572+
- `queryDef` accepts `db` in XML validation only; runtime execution DB is selected from the sheet's `db` or the global default DB.
573+
562574
## 🕒 Custom Date/Time Variables
563575

564576
SQL2Excel provides a powerful custom date variable system that allows you to display current date and time in any format you want. These variables can be used in queries, file names, and any text content.

USER_MANUAL_KR.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919

2020
SQL2Excel은 고급 스타일링, 템플릿 지원, 독립 실행 파일 배포 기능을 갖춘 SQL 쿼리 결과로 엑셀 파일을 생성하는 강력한 Node.js 기반 도구입니다.
2121

22+
### v2.1.5-beta(v1.3.5) 주요 변경
23+
24+
- 동적 변수 DB 라우팅
25+
- XML `dynamicVar`에서 `db` 속성 지원 (`database`의 별칭)
26+
- 각 동적 변수는 지정된 DB 어댑터에서 실행, 미지정 시 전역 기본 DB 사용
27+
- XML 검증 업데이트
28+
- XML 스키마 검증에서 `queryDef``db` 속성 허용 (실행 DB는 여전히 시트 `db` 또는 전역 기본 DB로 결정)
29+
2230
### v2.1.4-beta(v1.3.4) 주요 변경
2331

2432
- 어댑터별 DB 연결 테스트 쿼리 도입
@@ -539,15 +547,15 @@ node src/excel-cli.js export --xml queries.xml --style modern
539547
#### XML 구성
540548
```xml
541549
<dynamicVars>
542-
<!-- column_identified 사용 (기본값) -->
543-
<dynamicVar name="customerData" description="고객 정보">
550+
<!-- column_identified 사용 (기본값), 특정 DB에서 실행 -->
551+
<dynamicVar name="customerData" description="고객 정보" db="sampleDB">
544552
<![CDATA[
545553
SELECT CustomerID, CustomerName, Region FROM Customers
546554
]]>
547555
</dynamicVar>
548556

549-
<!-- key_value_pairs 사용 -->
550-
<dynamicVar name="productPrices" type="key_value_pairs" description="제품 가격">
557+
<!-- key_value_pairs 사용, 다른 DB에서 실행 -->
558+
<dynamicVar name="productPrices" type="key_value_pairs" description="제품 가격" database="mariaDB">
551559
<![CDATA[
552560
SELECT ProductID, UnitPrice FROM Products WHERE Discontinued = 0
553561
]]>
@@ -571,6 +579,10 @@ WHERE CustomerID IN (${customerData.CustomerID})
571579
4. **성능**: 변수는 한 번 실행되고 전체 내보내기에 대해 캐시됩니다
572580
5. **디버그 모드**: 자세한 변수 치환을 위해 `DEBUG_VARIABLES=true`로 활성화
573581

582+
참고:
583+
- `dynamicVar`에서 지원하는 속성: `name`, `description`, `type`, `db`, `database` (`db`는 별칭). 둘 다 있으면 `database`가 우선합니다.
584+
- `queryDef`는 XML 검증에서 `db` 속성을 허용합니다. 실행 시점의 DB는 시트의 `db` 또는 전역 기본 DB로 결정됩니다.
585+
574586
## 🕒 커스텀 날짜/시간 변수
575587

576588
SQL2Excel은 원하는 형식으로 현재 날짜와 시간을 표시할 수 있는 강력한 커스텀 날짜 변수 시스템을 제공합니다. 이러한 변수는 쿼리, 파일 이름 및 모든 텍스트 콘텐츠에서 사용할 수 있습니다.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sql2excel",
3-
"version": "2.1.4-beta",
3+
"version": "2.1.5-beta",
44
"description": "SQL 쿼리 결과를 엑셀 파일로 저장하는 도구 (시트별 쿼리, 변수, XML/JSON 지원)",
55
"main": "app.js",
66
"scripts": {

0 commit comments

Comments
 (0)