teradatasql 20.0.0 → 20.0.2
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/README.md +49 -69
- package/lib/teradatasql.dll +0 -0
- package/lib/teradatasql.dylib +0 -0
- package/lib/teradatasql.so +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
This package enables Node.js applications to connect to the Teradata Database.
|
|
4
4
|
|
|
5
|
-
This package
|
|
5
|
+
This package requires 64-bit Node.js 12 or later, and runs on Windows, macOS, and Linux. 32-bit Node.js is not supported.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
> :information_source: Please note Node.js versions 14 and 16 are not currently supported for Linux and macOS. There is an issue in Node.js that affects `node-ffi-napi` library that the driver depends on: [node-ffi-napi/ref-napi#54](https://github.com/node-ffi-napi/ref-napi/issues/54). Newer versions of Node.js fixed the issue.
|
|
7
|
+
> Please note that Node.js versions 14 and 16 are not currently supported for Linux and macOS. An issue ([ref-napi#54](https://github.com/node-ffi-napi/ref-napi/issues/54)) in Node.js versions 14 and 16 affects the `node-ffi-napi` library that the driver depends on. This issue is fixed in later versions of Node.js.
|
|
10
8
|
|
|
11
9
|
For community support, please visit [Teradata Community](https://support.teradata.com/community).
|
|
12
10
|
|
|
@@ -37,7 +35,6 @@ Copyright 2023 Teradata. All Rights Reserved.
|
|
|
37
35
|
* [Undefined Values](#UndefinedValues)
|
|
38
36
|
* [Character Export Width](#CharacterExportWidth)
|
|
39
37
|
* [Module Constructors](#ModuleConstructors)
|
|
40
|
-
* [Module Globals](#ModuleGlobals)
|
|
41
38
|
* [Module Exceptions](#ModuleExceptions)
|
|
42
39
|
* [Connection Attributes](#ConnectionAttributes)
|
|
43
40
|
* [Connection Methods](#ConnectionMethods)
|
|
@@ -55,13 +52,9 @@ Copyright 2023 Teradata. All Rights Reserved.
|
|
|
55
52
|
|
|
56
53
|
### Features
|
|
57
54
|
|
|
58
|
-
The *Teradata SQL Driver for Node.js* is a DBAPI Driver that enables Node.js applications to connect to the Teradata Database. The driver closely implements the [PEP-249 Python Database API Specification 2.0](https://www.python.org/dev/peps/pep-0249/).
|
|
59
|
-
|
|
60
|
-
The driver is a young product that offers a basic feature set. We are working diligently to add features to the driver, and our goal is feature parity with the Teradata JDBC Driver.
|
|
61
|
-
|
|
62
55
|
At the present time, the driver offers the following features.
|
|
63
56
|
|
|
64
|
-
* Supported for use with Teradata Database 16.
|
|
57
|
+
* Supported for use with Teradata Database 16.20 and later releases.
|
|
65
58
|
* COP Discovery.
|
|
66
59
|
* Laddered Concurrent Connect.
|
|
67
60
|
* HTTPS/TLS connections with Teradata SQL Engine 16.20.53.30 and later.
|
|
@@ -94,12 +87,10 @@ At the present time, the driver offers the following features.
|
|
|
94
87
|
|
|
95
88
|
### Installation
|
|
96
89
|
|
|
97
|
-
The driver depends on the `ffi-napi`, `ref-napi`, `ref-array-di` packages which
|
|
90
|
+
The driver depends on the `ffi-napi`, `ref-napi`, `ref-array-di` packages which are available from [npmjs.com](http://www.npmjs.com).
|
|
98
91
|
|
|
99
92
|
Use `npm install teradatasql` to download and install the driver and its dependencies automatically.
|
|
100
93
|
|
|
101
|
-
When upgrading to a new version of the driver, you may need to use pip install's `--force` option to force the download of the new version.
|
|
102
|
-
|
|
103
94
|
<a id="License"></a>
|
|
104
95
|
|
|
105
96
|
### License
|
|
@@ -126,38 +117,38 @@ Sample programs are provided to demonstrate how to use the driver. When the driv
|
|
|
126
117
|
|
|
127
118
|
The sample programs are coded with a fake database hostname `whomooz`, username `guest`, and password `please`. Substitute your actual database hostname and credentials before running a sample program.
|
|
128
119
|
|
|
129
|
-
Program
|
|
130
|
-
|
|
131
|
-
[AGKRBatchInsert.ts](https://github.
|
|
132
|
-
[AGKRInsertSelect.ts](https://github.
|
|
133
|
-
[BatchInsert.ts](https://github.
|
|
134
|
-
[BatchInsertCSV.ts](https://github.
|
|
135
|
-
[BatchInsPerf.ts](https://github.
|
|
136
|
-
[CharPadding.ts](https://github.
|
|
137
|
-
[CommitRollback.ts](https://github.
|
|
138
|
-
[DecimalDigits.ts](https://github.
|
|
139
|
-
[DriverDatabaseVersion.ts](https://github.
|
|
140
|
-
[ElicitFile.ts](https://github.
|
|
141
|
-
[ExportCSVResult.ts](https://github.
|
|
142
|
-
[ExportCSVResults.ts](https://github.
|
|
143
|
-
[FakeExportCSVResults.ts](https://github.
|
|
144
|
-
[FakeResultSetCon.ts](https://github.
|
|
145
|
-
[FakeResultSetEsc.ts](https://github.
|
|
146
|
-
[FastExportCSV.ts](https://github.
|
|
147
|
-
[FastExportTable.ts](https://github.
|
|
148
|
-
[FastLoadBatch.ts](https://github.
|
|
149
|
-
[FastLoadCSV.ts](https://github.
|
|
150
|
-
[HelpSession.ts](https://github.
|
|
151
|
-
[IgnoreErrors.ts](https://github.
|
|
152
|
-
[InsertLob.ts](https://github.
|
|
153
|
-
[InsertXML.ts](https://github.
|
|
154
|
-
[LoadCSVFile.ts](https://github.
|
|
155
|
-
[LobLocators.ts](https://github.
|
|
156
|
-
[MetadataFromPrepare.ts](https://github.
|
|
157
|
-
[ParamDataTypes.ts](https://github.
|
|
158
|
-
[ShowCommand.ts](https://github.
|
|
159
|
-
[StoredProc.ts](https://github.
|
|
160
|
-
[TJEncryptPassword.ts](https://github.
|
|
120
|
+
Program | Purpose
|
|
121
|
+
-------------------------------------------------------------------------------------------------------------------- | ---
|
|
122
|
+
[AGKRBatchInsert.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/AGKRBatchInsert.ts) | Demonstrates how to insert a batch of rows with Auto-Generated Key Retrieval (AGKR)
|
|
123
|
+
[AGKRInsertSelect.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/AGKRInsertSelect.ts) | Demonstrates Insert/Select with Auto-Generated Key Retrieval (AGKR)
|
|
124
|
+
[BatchInsert.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/BatchInsert.ts) | Demonstrates how to insert a batch of rows
|
|
125
|
+
[BatchInsertCSV.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/BatchInsertCSV.ts) | Demonstrates how to insert a batch of rows from a CSV file
|
|
126
|
+
[BatchInsPerf.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/BatchInsPerf.ts) | Measures time to insert one million rows
|
|
127
|
+
[CharPadding.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/CharPadding.ts) | Demonstrates the database's *Character Export Width* behavior
|
|
128
|
+
[CommitRollback.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/CommitRollback.ts) | Demonstrates commit and rollback methods with auto-commit off.
|
|
129
|
+
[DecimalDigits.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/DecimalDigits.ts) | Demonstrates how to format decimal.Decimal values.
|
|
130
|
+
[DriverDatabaseVersion.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/DriverDatabaseVersion.ts) | Displays the driver version and database version
|
|
131
|
+
[ElicitFile.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/ElicitFile.ts) | Demonstrates C source file upload to create a User-Defined Function (UDF)
|
|
132
|
+
[ExportCSVResult.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/ExportCSVResult.ts) | Demonstrates how to export a query result set to a CSV file
|
|
133
|
+
[ExportCSVResults.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/ExportCSVResults.ts) | Demonstrates how to export multiple query result sets to CSV files
|
|
134
|
+
[FakeExportCSVResults.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FakeExportCSVResults.ts) | Demonstrates how to export multiple query result sets with the metadata to CSV files
|
|
135
|
+
[FakeResultSetCon.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FakeResultSetCon.ts) | Demonstrates connection parameter for fake result sets
|
|
136
|
+
[FakeResultSetEsc.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FakeResultSetEsc.ts) | Demonstrates escape function for fake result sets
|
|
137
|
+
[FastExportCSV.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FastExportCSV.ts) | Demonstrates how to FastExport rows from a table to a CSV file
|
|
138
|
+
[FastExportTable.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FastExportTable.ts) | Demonstrates how to FastExport rows from a table
|
|
139
|
+
[FastLoadBatch.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FastLoadBatch.ts) | Demonstrates how to FastLoad batches of rows
|
|
140
|
+
[FastLoadCSV.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/FastLoadCSV.ts) | Demonstrates how to FastLoad batches of rows from a CSV file
|
|
141
|
+
[HelpSession.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/HelpSession.ts) | Displays session information
|
|
142
|
+
[IgnoreErrors.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/IgnoreErrors.ts) | Demonstrates how to ignore errors
|
|
143
|
+
[InsertLob.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/InsertLob.ts) | Demonstrates how to insert BLOB and CLOB values
|
|
144
|
+
[InsertXML.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/InsertXML.ts) | Demonstrates how to insert and retrieve XML values
|
|
145
|
+
[LoadCSVFile.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/LoadCSVFile.ts) | Demonstrates how to load data from a CSV file into a table
|
|
146
|
+
[LobLocators.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/LobLocators.ts) | Demonstrates how to use LOB locators
|
|
147
|
+
[MetadataFromPrepare.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/MetadataFromPrepare.ts) | Demonstrates how to prepare a SQL request and obtain SQL statement metadata
|
|
148
|
+
[ParamDataTypes.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/ParamDataTypes.ts) | Demonstrates how to specify data types for parameter marker bind values
|
|
149
|
+
[ShowCommand.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/ShowCommand.ts) | Displays the results from the `SHOW` command
|
|
150
|
+
[StoredProc.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/StoredProc.ts) | Demonstrates how to create and call a SQL stored procedure
|
|
151
|
+
[TJEncryptPassword.ts](https://github.com/Teradata/nodejs-driver/blob/develop/samples/TJEncryptPassword.ts) | Creates encrypted password files
|
|
161
152
|
|
|
162
153
|
<a id="Using"></a>
|
|
163
154
|
|
|
@@ -178,15 +169,16 @@ You may specify connection parameters as a JavaScript object, as a JSON string,
|
|
|
178
169
|
|
|
179
170
|
Connection parameters specified only as a JavaScript object:
|
|
180
171
|
|
|
181
|
-
con = teradataConnection.connect({host:"whomooz",user:"guest",password:"please"})
|
|
172
|
+
con = teradataConnection.connect({host:"whomooz",user:"guest",password:"please"})
|
|
182
173
|
|
|
183
174
|
Connection parameters specified as a JSON string:
|
|
184
175
|
|
|
185
|
-
con = teradataConnection.connect({}, '{"host":"whomooz", "user":"guest", "password":"please"}')
|
|
176
|
+
con = teradataConnection.connect({}, '{"host":"whomooz", "user":"guest", "password":"please"}')
|
|
186
177
|
|
|
187
178
|
Connection parameters specified using a combination:
|
|
188
179
|
|
|
189
|
-
con = teradataConnection.connect({host:"whomooz"}, '{"user":"guest", "password":"please"}')
|
|
180
|
+
con = teradataConnection.connect({host:"whomooz"}, '{"user":"guest", "password":"please"}')
|
|
181
|
+
|
|
190
182
|
When a combination of parameters are specified, connection parameters specified as a JSON string take precedence over same-named connection parameters specified in the JavaScript object.
|
|
191
183
|
|
|
192
184
|
<a id="ConnectionParameters"></a>
|
|
@@ -686,13 +678,13 @@ Bind-value JavaScript data type | Teradata Database data type
|
|
|
686
678
|
--------------------------------- | ---
|
|
687
679
|
`Boolean` | Not supported
|
|
688
680
|
`BigInt` | `BIGINT`
|
|
689
|
-
`Date` | `TIMESTAMP(3)
|
|
681
|
+
`Date` | `TIMESTAMP(3)`
|
|
690
682
|
`Number` | `FLOAT`
|
|
691
683
|
`String` | `VARCHAR`
|
|
692
684
|
`Symbol` | Not supported
|
|
693
685
|
`Uint8Array` | `VARBYTE`
|
|
694
686
|
|
|
695
|
-
|
|
687
|
+
The Teradata SQL Driver for Node.js transmits the UTC time of the JavaScript Date object to the server as the `TIMESTAMP(3)` value.
|
|
696
688
|
|
|
697
689
|
Transforms are used for SQL `ARRAY` data values, and they can be transferred to and from the database as `VARCHAR` values.
|
|
698
690
|
|
|
@@ -795,24 +787,6 @@ Creates and returns a `Date` value corresponding to the specified number of seco
|
|
|
795
787
|
|
|
796
788
|
<a id="ModuleGlobals"></a>
|
|
797
789
|
|
|
798
|
-
### Module Globals
|
|
799
|
-
|
|
800
|
-
`teradatasql.apilevel`
|
|
801
|
-
|
|
802
|
-
String constant `"2.0"` indicating that the driver closely implements the [PEP-249 Python Database API Specification 2.0](https://www.python.org/dev/peps/pep-0249/).
|
|
803
|
-
|
|
804
|
-
---
|
|
805
|
-
|
|
806
|
-
`teradatasql.threadsafety`
|
|
807
|
-
|
|
808
|
-
Integer constant `2` indicating that threads may share this module, and threads may share connections, but threads must not share cursors.
|
|
809
|
-
|
|
810
|
-
---
|
|
811
|
-
|
|
812
|
-
`teradatasql.paramstyle`
|
|
813
|
-
|
|
814
|
-
String constant `"qmark"` indicating that prepared SQL requests use question-mark parameter markers.
|
|
815
|
-
|
|
816
790
|
<a id="ModuleExceptions"></a>
|
|
817
791
|
|
|
818
792
|
### Module Exceptions
|
|
@@ -1443,5 +1417,11 @@ Limitations when exporting to CSV files:
|
|
|
1443
1417
|
|
|
1444
1418
|
### Change Log
|
|
1445
1419
|
|
|
1420
|
+
`20.0.2` - November 16, 2023
|
|
1421
|
+
* Build DLL and shared library with Go 1.20.11
|
|
1422
|
+
|
|
1423
|
+
`20.0.1` - November 14, 2023
|
|
1424
|
+
* Correct links for sample programs
|
|
1425
|
+
|
|
1446
1426
|
`20.0.0` - November 8, 2023
|
|
1447
|
-
* Initial release
|
|
1427
|
+
* Initial release
|
package/lib/teradatasql.dll
CHANGED
|
Binary file
|
package/lib/teradatasql.dylib
CHANGED
|
Binary file
|
package/lib/teradatasql.so
CHANGED
|
Binary file
|