Go to file
Christopher Jones 16ee5078fb Improve null pointer checks 2016-05-16 09:46:01 +10:00
doc Bump doc copyright 2016-05-16 09:20:14 +10:00
examples Remove unused result param from DDL execute() callbacks 2016-03-24 21:40:28 +11:00
lib Removed unused reference to streamNumRows on ResultSet 2016-03-24 21:46:52 +11:00
src Improve null pointer checks 2016-05-16 09:46:01 +10:00
test Add prefix to PL/SQL procedure to avoid name clashes 2016-05-16 09:43:20 +10:00
.editorconfig Add editorconfig 2016-03-24 21:47:37 +11:00
.gitignore Update examples for node-oracledb 1.0 2015-08-17 16:03:41 +10:00
.npmignore No need to install editorconfig when running "npm install" 2016-05-16 09:38:32 +10:00
CHANGELOG.md Bump version to 1.9 2016-05-16 09:19:15 +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 Fix overview link in INSTALL 2016-05-16 09:42:02 +10:00
LICENSE.md Whitespace cleanup 2016-03-24 17:09:53 +11:00
README.md Small wording tweaks 2016-05-16 09:21:25 +10:00
binding.gyp Fixed creation of Windows debug builds 2016-03-24 21:15:29 +11: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 1.9 2016-05-16 09:19:15 +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 LTS and 5 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:

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:

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' ] ]

Documentation

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

Changes

See CHANGELOG

Testsuite

To run the included testsuite 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.