node-oracledb/README.md

102 lines
6.1 KiB
Markdown
Raw Normal View History

2017-06-14 09:49:08 +08:00
# node-oracledb version 2.0
2015-01-21 00:51:22 +08:00
## <a name="about"></a> About node-oracledb
2015-01-21 00:51:22 +08:00
The node-oracledb add-on for Node.js powers high performance Oracle
Database applications.
2015-01-21 00:51:22 +08:00
2017-06-17 13:49:16 +08:00
Use node-oracledb to connect Node.js 4, 6, and 8 to Oracle Database.
2015-01-21 00:51:22 +08:00
The add-on is stable, well documented, and has a comprehensive test suite.
2015-01-21 00:51:22 +08:00
The node-oracledb project is open source and maintained by Oracle Corp. The home page is on the
[Oracle Technology Network](http://www.oracle.com/technetwork/database/database-technologies/scripting-languages/node_js/).
2015-01-21 00:51:22 +08:00
2015-08-17 14:05:00 +08:00
### Node-oracledb supports:
2017-06-14 09:49:08 +08:00
- [Promises](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#promiseoverview), [Callbacks](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#intro) and [Streams](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#querystream)
2015-08-17 14:05:00 +08:00
- [SQL and PL/SQL execution](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#sqlexecution)
- [REF CURSORs](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#refcursors)
2017-06-14 09:49:08 +08:00
- [Large Objects: CLOBs and BLOBs as Streams or Strings and Buffers](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#lobhandling)
- [Oracle Database 12c JSON datatype](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#jsondatatype)
- [Query results as JavaScript objects or arrays](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#queryoutputformats)
2015-08-17 14:05:00 +08:00
- [Smart mapping between JavaScript and Oracle types with manual override available](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#typemap)
2017-06-14 09:49:08 +08:00
- [Data binding using JavaScript types, objects or arrays](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#bind)
2015-08-17 14:05:00 +08:00
- [Transaction Management](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#transactionmgt)
2017-06-14 09:49:08 +08:00
- [Inbuilt Connection Pool with Queueing, Aliasing and Liveness checking](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#connpooling)
2015-08-17 14:05:00 +08:00
- [Database Resident Connection Pooling (DRCP)](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#drcp)
- [External Authentication](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth)
- [Row Prefetching](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#rowprefetching)
- [Statement Caching](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#stmtcache)
2017-06-14 09:49:08 +08:00
- [Client Result Caching](https://docs.oracle.com/database/122/ADFNS/performance-and-scalability.htm#ADFNS464)
2015-09-02 18:54:40 +08:00
- [End-to-end Tracing, Mid-tier Authentication, and Auditing](https://github.com/oracle/node-oracledb/blob/master/doc/api.md#endtoend)
2016-05-16 07:21:25 +08:00
- Oracle High Availability Features
2017-06-14 09:49:08 +08:00
- [Fast Application Notification (FAN)](https://docs.oracle.com/database/122/ADFNS/high-availability.htm#ADFNS538)
- [Runtime Load Balancing (RLB)](https://docs.oracle.com/database/122/ADFNS/connection_strategies.htm#ADFNS515)
- [Transparent Application Failover (TAF)](https://docs.oracle.com/database/122/ADFNS/high-availability.htm#ADFNS-GUID-96599425-9BDA-483C-9BA2-4A4D13013A37)
2015-08-17 14:05:00 +08:00
We are actively working on supporting the best Oracle Database
features, and on functionality requests from
[users involved in the project](https://github.com/oracle/node-oracledb/issues).
## <a name="installation"></a> Installation
Prerequisites:
- [Python 2.7](https://www.python.org/downloads/)
- C Compiler with support for C++ 11 (Xcode, gcc, Visual Studio or similar)
- The client libraries for Oracle Database 12.2, 12.1 or 11.2 in your OS library search path, such as `PATH` on Windows, or `LD_LIBRARY_PATH` on Linux, or in `~/lib` on macOS. On Windows, Visual Studio [redistributables are required](https://github.com/oracle/node-oracledb/tree/master/INSTALL.md#winprereqs). If your database is remote, use the client libraries from the free [Oracle Instant Client](http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html) "Basic" package. Or use the client libraries from a locally installed database such as the free [Oracle XE](http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html) release. Version 12.2 client libraries can connect to Oracle Database 11.2 or greater. Version 12.1 client libraries can connect to Oracle Database 10.2 or greater. Version 11.2 client libraries can connect to Oracle Database 9.2 or greater.
2017-06-14 09:49:08 +08:00
Run `npm install oracledb` to install from the [npm registry](https://www.npmjs.com/package/oracledb).
See [INSTALL](https://github.com/oracle/node-oracledb/tree/master/INSTALL.md) for details.
## <a name="examples"></a> Examples
2017-06-14 09:49:08 +08:00
See the
[examples](https://github.com/oracle/node-oracledb/tree/master/examples) directory.
Start
with
[examples/select1.js](https://github.com/oracle/node-oracledb/blob/master/examples/select1.js#L35).
## <a name="doc"></a> Documentation
2015-01-21 00:51:22 +08:00
See [Documentation for the Oracle Database Node.js Add-on](https://github.com/oracle/node-oracledb/tree/master/doc/api.md).
2015-01-21 00:51:22 +08:00
2016-07-08 14:55:43 +08:00
## <a name="help"></a> Help
Issues and questions can be raised with the node-oracledb community on [GitHub](https://github.com/oracle/node-oracledb/issues).
## <a name="changes"></a> Changes
2015-05-05 00:53:11 +08:00
2016-07-08 14:55:43 +08:00
See [CHANGELOG](https://github.com/oracle/node-oracledb/tree/master/CHANGELOG.md).
2015-05-05 00:53:11 +08:00
2016-07-08 14:55:43 +08:00
## <a name="testing"></a> Tests
2015-08-17 14:05:00 +08:00
To run the test suite see [test/README](https://github.com/oracle/node-oracledb/tree/master/test/README.md).
2015-08-17 14:05:00 +08:00
## <a name="contrib"></a> Contributing
2015-01-21 00:51:22 +08:00
Node-oracledb is an open source project. See
2015-08-17 14:05:00 +08:00
[CONTRIBUTING](https://github.com/oracle/node-oracledb/tree/master/CONTRIBUTING.md)
2015-01-21 00:51:22 +08:00
for details.
2015-09-25 16:51:13 +08:00
Oracle gratefully acknowledges the contributions to node-oracledb that have been made by the community.
## <a name="license"></a> License
2015-01-21 00:51:22 +08:00
2017-06-14 09:49:08 +08:00
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
2015-01-21 00:51:22 +08:00
You may not use the identified files except in compliance with the Apache
License, Version 2.0 (the "License.")
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.