Steven Olmsted![]()
This module should not be used for anything serious. It is no longer supported.
Use the db-oracle package on NPM to connect to Oracle from Node.js.
https://github.com/mariano/node-db-oracle
This module provides an interface to an Oracle database from Node.js. It requires Oracle's SQL*Plus application to be installed. This module runs SQL*Plus as a child process and communicates through stdin and stdout.
There aren't any bells or whistles here. I would not consider using this in a production environment. Don't point this at important or valuable data.
This is not intended to run in a web browser or environment outside of Node.js. This module was made for Node.js 0.4.x. It may not work well or at all with current versions of Node. This module also requires gallery-child-process: http://yuilibrary.com/gallery/show/child-process
This module has to be defined for loader before it can be used. See the code sample.
I strongly recommend reading the entire gallery-sqlplus-debug.js source file before attempting to use this module.
require('yui3').YUI({
modules: {
'gallery-child-process': {
fullpath: '/path/to/install/gallery-child-process-min.js',
requires: [
'base'
]
},
'gallery-sqlplus': {
fullpath: '/path/to/install/gallery-sqlplus-min.js',
requires: [
'dataschema-xml',
'gallery-child-process'
]
}
}
}).use('gallery-sqlplus', function(Y) {
var sqlPlus = new Y.SqlPlus({
connection: {
database: 'myDatabase',
host: 'localhost',
password: 'myPassword',
user: 'myUser'
}
});
sqlPlus.execute("SELECT COUNT(*) AS count FROM users WHERE join_time > CURRENT_TIMESTAMP - INTERVAL '1' DAY;", function (error, data) {
if (error) {
Y.log(error, 'error');
} else {
Y.log(data[0].COUNT + ' users joined today!', 'info');
}
sqlPlus.write('quit\n');
});
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info