Go to file
Christopher Jones 46613a38a2 Test updates 2017-06-14 10:56:58 +10:00
.github Reinforce that ODPI-C does not take PRs 2017-06-14 09:55:28 +10:00
doc Merged from master. Most of these changes are for extended metadata support 2017-06-14 08:38:08 +10:00
examples Fixed example indentation for consistency 2016-05-16 10:07:48 +10:00
lib Add constants DB_TYPE_LONG and DB_TYPE_LONG_RAW for the LONG and LONG RAW types respectively 2017-06-14 10:08:03 +10:00
odpi@897122c656 Added submodule for the ODPI-C repository code and adjusted binding.gyp to make use of it 2017-06-14 08:49:32 +10:00
src/njs/src If external authentication is specified, mark pool as heterogenous; otherwise error ORA-24429: External authentication is not supported in this mode" is raised 2017-06-14 10:34:33 +10:00
test Test updates 2017-06-14 10:56:58 +10:00
.editorconfig Add editorconfig 2016-03-24 21:47:37 +11:00
.gitignore Add instantclient dirs to gitignores to development easier for people who have instantclient in the clone dir 2016-05-16 09:55:51 +10:00
.gitmodules Added submodule for the ODPI-C repository code and adjusted binding.gyp to make use of it 2017-06-14 08:49:32 +10:00
.npmignore Do not bundle tests when installing from NPM with "npm install oracledb" 2016-05-16 09:47:46 +10:00
CHANGELOG.md Fix build error with Oracle client 11.2.0.1 and 11.2.0.2 2016-05-24 15:55:18 +10:00
CONTRIBUTING.md Add new OTN forum links for submitting feedback and discussing node-oracledb 2015-01-20 17:17:09 -08:00
INSTALL.md Update AIX and Solaris install instructions 2016-07-08 16:54:51 +10:00
LICENSE.md Whitespace cleanup 2016-03-24 17:09:53 +11:00
README.md Link to node-oracledb JSON doc 2016-07-08 16:56:23 +10:00
binding.gyp No need to list headers in the sources 2017-06-14 09:52:24 +10:00
index.js Added JavaScript wrapper around C++ classes. Added connection pool queue 2016-02-29 13:48:48 +11:00
package.json Bump version to keep in sync with v1 2017-06-14 08:39:12 +10:00

README.md

node-oracledb version 1.9

About node-oracledb

The node-oracledb add-on for Node.js powers high performance Oracle Database applications.

Use node-oracledb to connect Node.js 0.10, 0.12, 4, 5 and 6 to Oracle Database.

The add-on is stable, well documented, and has a comprehensive test suite.

The node-oracledb project is open source and maintained by Oracle Corp. The home page is on the Oracle Technology Network.

Node-oracledb supports:

Various Oracle Database and Oracle Client versions, can be used. Oracle's cross-version compatibility allows one node-oracledb installation to connect to different database versions.

We are actively working on supporting the best Oracle Database features, and on functionality requests from users involved in the project.

Installation

Prerequisites:

  • Python 2.7
  • C Compiler with support for C++ 11 (Xcode, gcc, Visual Studio or similar)
  • The small, free Oracle Instant Client "basic" and "SDK" packages if your database is remote. Or use the libraries and headers from a locally installed database such as the free Oracle XE release
  • Set OCI_LIB_DIR and OCI_INC_DIR during installation if the Oracle libraries and headers are in a non-default location

Run npm install oracledb to install from the NPM registry.

See INSTALL for details.

Examples

There are examples in the examples directory.

A simple query example with callbacks:

var oracledb = require('oracledb');

oracledb.getConnection(
  {
    user          : "hr",
    password      : "welcome",
    connectString : "localhost/XE"
  },
  function(err, connection)
  {
    if (err) { console.error(err.message); return; }

    connection.execute(
      "SELECT department_id, department_name " +
        "FROM departments " +
        "WHERE manager_id < :id",
      [110],  // bind value for :id
      function(err, result)
      {
        if (err) { console.error(err.message); return; }
        console.log(result.rows);
      });
  });

With Oracle's sample HR schema, the output is:

[ [ 60, 'IT' ], [ 90, 'Executive' ], [ 100, 'Finance' ] ]

Node Promises can also be used.

Documentation

See Documentation for the Oracle Database Node.js Add-on.

Help

Issues and questions can be raised with the node-oracledb community on GitHub.

Changes

See CHANGELOG.

Tests

To run the test suite see test/README.

Contributing

Node-oracledb is an open source project. See CONTRIBUTING for details.

Oracle gratefully acknowledges the contributions to node-oracledb that have been made by the community.

License

Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.

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.