Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Node-oracledb Examples

This directory contains node-oracledb 3.1 examples.

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

Node-oracledb documentation

Issues and questions

Issues and questions about node-oracledb can be posted on GitHub or Slack (link to join Slack.

To run the examples:

  • Install node-oracledb.

  • Use demo.sql to create schema objects used by the samples. For example, to load them in the HR schema run:

    sqlplus hr
    SQL> @demo.sql
    
  • Edit dbconfig.js and set your username and the database connection string:

    module.exports = {
        user: "hr",
        password: process.env.NODE_ORACLEDB_PASSWORD,
        connectString:"localhost/orclpdb"
    };
    
  • Set the environment variable NODE_ORACLEDB_PASSWORD to your database schema password.

    On Windows:

    set NODE_ORACLEDB_PASSWORD=...
    

    On Linux:

    export NODE_ORACLEDB_PASSWORD=...
    
  • Then run the samples like:

    node select1.js
    

The demonstration objects can be dropped with demodrop.sql:

sqlplus hr/welcome@localhost/orclpdb @demodrop.sql