All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Reject execute/query while the connection is closing or already closed (
_closing/_connectedguards). connection.execute(sql)/executeNonQuerynow report SELECT row counts (from CommandComplete when present, otherwise drained row count) instead of leaving-1.- External-table socket writes settle only after the write callback (or drain), so a late write error cannot be ignored after an early resolve.
- pg-style
connection.query()/pool.query()returning bufferedQueryResult(rows,rowCount,fields,notices). - Connection URI support via
parseConnectionStringandnew NzConnection('netezza://...')/nz://. - Structured
NzDatabaseErrorwith PostgreSQL-style field parsing (severity, SQLSTATEcode, detail, hint). - Shared SQL parameter helpers (
escapeLiteral,substituteParameters) with honest client-side escaping semantics. - Socket transport abstraction (
SocketTransport) for clearer I/O boundaries. - Offline unit tests (
npm run test:unit) for parameters, errors, and connection strings; CI runs them on every push/PR. - Dual CJS + ESM package layout (
dist/cjs,dist/esm) withexports/module/sideEffects: false. - Typedoc script (
npm run docs); TypeDoc still peers on TypeScript 6.x, so the repo useslegacy-peer-deps(see.npmrc). NOTICEincluded in the published package.- Dependabot updates for GitHub Actions; npm publish with
--provenanceand release-tag/version assertion. .env.exampleandgetNzConfigtest helper (NZ_DEV_*,NZ_USE_LAB_DEFAULTS).
- Package version 2.4.0; Node
enginessoftened to>=18.18.0. - TypeScript bumped to ^7.0.2.
- Integration tests no longer hardcode lab host credentials; suites skip when env is missing.
- README leads with pg-style quick start; ADO.NET API documented as a secondary streaming style.
2.3.3 - 2026-07-24
- Kept TypeScript on the 6.x line for
ts-jestpeer compatibility after the 2.3.2 tooling experiment.
- Release packaging and dependency alignment for a clean 2.3.x publish.
- Removed
ts-jestfrom the development toolchain once it was no longer required.
2.3.2 - 2026-07-24
- Removed ESLint from the development toolchain.
- Attempted a TypeScript 7 bump (later reverted in 2.3.3 for peer-dependency compatibility).
Note: This version may not have published cleanly to npm; prefer 2.3.3 or later.
2.3.1 - 2026-07-24
- Drain orphaned/stale backend protocol responses before starting the next query so the connection stays in sync after cancelled or interrupted work.
- Dependency upgrades bundled with the 2.3.x maintenance line.
2.3.0 - 2026-07-11
- Further optimized DBOS row parsing for large result sets.
- Dependency upgrades in
package-lock.json.
2.2.0 - 2026-05-23
- Parameter support on
NzCommand/createCommand, including parameter substitution during query execution. - Cancel-operation timeout support.
- Enhanced SSL security handling.
- Optimized DBOS row parsing with buffer-based parsers and batch processing.
- Refactored
TimeValueto avoid duplicated type definitions. - Cross-platform debug test script improvements.
- Prevented stale command cancellations from disrupting later work.
- Improved
readBytesto accumulate partial socket reads until the required byte count is available. - Simplified command-number initialization and increment logic.
2.1.0 - 2026-05-16
- Built-in connection pool (
NzPool) with configurable limits, timeouts, and idle management. - Comprehensive pool and notice-handling tests.
- Updated development dependencies.
2.0.0 - 2026-04-03
- Loose text-protocol queries now return the same JavaScript value types as table-backed binary queries when the server exposes a known type OID. Queries such as
SELECT true::BOOLEAN,SELECT '2024-12-11'::DATE,SELECT '2024-12-11 14:30:00'::TIMESTAMP, andSELECT 12345::BIGINTno longer come back as raw strings. BOOLnow returnsboolean,BYTEINT/INT2/INT4/OIDreturnnumber,INT8returnsbigint,DATE/TIMESTAMP/TIMESTAMPTZ/ABSTIMEreturnDate, andNUMERICfollows the same precision-preservingnumber | stringrule on both protocol paths.
- Reduced row-decoding overhead in both text and binary paths by caching per-column parsers, precomputing null-bitmap lookups, caching reader metadata, and replacing the legacy binary
NUMERICdecoder with aBigInt-based implementation. getSchemaTable()andgetColumnMetadata()now reportBigIntforINT8columns so schema metadata matches the runtime value contract introduced in2.0.0.- Consolidated the unreleased 1.1.1 metadata work into this release so the changelog reflects the actual published history.
- Unified text-protocol
DataRowconversion with the existing binary/DBOS conversion contract soSELECT ...andSELECT ... FROM tableno longer disagree on value types for booleans, integers, numerics, dates, timestamps, and known system OIDs. getSchemaTable().Rows[].AllowDBNullnow uses DBOS tuple-descriptor nullability when available instead of always reportingtrue.- SSL tests no longer depend on hardcoded
D:\DEV\Others\keys\...paths. The valid-certificate test is now gated byNZ_SSL_CERT_PATH, and the invalid-certificate fixture is created in the system temp directory. - External-table tests and example scripts no longer depend on machine-specific temp paths such as
C:\DEV\TMP; they now useNZ_LOCAL_TMP_DIRor the operating-system temp directory. - Corrected live Netezza metadata mapping for Unicode text OIDs:
2530now reportsNVARCHARinstead ofDATE, and2522now reportsNCHARinstead ofUNKNOWN(2522). - Kept
DATEmapping exclusive to provider OID1082and alignedgetSchemaTable()withgetTypeName()so Unicode text families stay string-like. - Preserved declared character lengths from
typeModin metadata and schema rows for character families such asVARCHAR(32),NVARCHAR(32), andNCHAR(8). - Added live metadata mappings for
BYTEINT(2500), systemOID(26), and systemABSTIME(702) so these no longer surface asUNKNOWN(...).
- Added regression coverage for typed loose
BOOLEAN,DATE,TIMESTAMP, andNUMERICqueries so text-protocol consistency is enforced in smoke/full tests. - Added numeric-conversion parity tests and an appliance-backed scenario benchmark harness for measuring real performance changes before keeping them.
- Added public metadata helpers on
NzDataReader:getProviderType(),getTypeModifier(),getTypeLength(),getDeclaredTypeName(), andgetColumnMetadata(). - Added live smoke/full coverage for
VARCHAR,NVARCHAR,NCHAR,NATIONAL CHARACTER VARYING,CURRENT_DATE, andCURRENT_TIMESTAMPmetadata. - Added live smoke coverage for
BYTEINT,_V_TABLE.OBJID(OID), and_V_TABLE.CREATEDATE(ABSTIME) metadata.
1.1.0 - 2026-02-16
The following methods now return unknown instead of any, requiring explicit type assertions:
NzDataReader.getValue(index)- Returnsunknowninstead ofanyNzDataReader.getValueByName(name)- Returnsunknowninstead ofanyNzDataReader.getValues()- Returnsunknown[]instead ofany[]NzDataReader.getRowObject()- ReturnsRecord<string, unknown>instead ofRecord<string, any>NzDataReader.currentRow- Is nowunknown[]instead ofany[]
Migration guide:
// Before (1.0.x)
const value = reader.getValue(0);
const str = value.toUpperCase(); // No error
// After (1.1.0)
const value = reader.getValue(0) as string; // Or use specific getters
const str = reader.getString(0); // Recommended- Now returns
Promise<boolean>instead ofPromise<void> - This may affect code that explicitly checked for void return type
- Strengthened TypeScript typings and refactors across
src/NzCommand.ts,src/NzConnection.ts, andsrc/NzDataReader.ts(improved interfaces,unknowntypes, exported generator/column types). - Improved buffer-pool and streaming read logic in
NzConnectionfor better performance and lower GC pressure. - Added external table log handling: saving
.nzlog,.nzbad, and.nzstatsfiles to configuredLOGDIRduring external table operations. - Fixed command/reader return types, timeout handling, and error typing for safer runtime behavior.
- Added/updated tests in
tests/ExternalTableTests.test.jscovering external table logging and.nzbadimport scenarios.
1.0.1 - 2026-02-14
- Version bump to 1.0.1 for release
1.0.0 - 2025-02-14
- Initial release of
@justybase/netezza-driver - Native TypeScript driver for IBM Netezza / PureData System for Analytics
- Direct connection to Netezza databases without ODBC drivers or external dependencies
- ADO.NET-style API with Connection/Command/Reader pattern
- SSL/TLS support for encrypted connections
- Full TypeScript type definitions and declarations
- High-performance buffer pooling for large result sets
- Support for all Netezza data types with proper type conversions
- Query cancellation support
- External table operations (import/export)
- Transaction handling
- Connection timeout configuration
- Comprehensive test suite (smoke tests + full tests)
- GitHub Actions CI/CD pipeline
- Apache 2.0 license
- Pure TypeScript implementation with no native bindings
- Compatible with Node.js 18.0.0 and above
- Supports CommonJS module format
- Includes debug logging support via
debugpackage