Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Install Instant Client Package - SDK
Finally install using Node Package Manager (npm):
npm install oracle
var oracle = require("oracle");
oracle.connect({ "hostname": "localhost", "user": "test", "password": "test" }, function(err, connection) {
// selecting rows
connection.execute("SELECT * FROM person WHERE name = :1", ['bob smith'], function(err, results) {
// results will be an array of objects
});
// inserting with return value
connection.execute(
"INSERT INTO person (name) VALUES (:1) RETURNING id INTO :2",
['joe ferner', new oracle.OutParam()],
function(err, results) {
// results.updateCount = 1
// results.returnParam = the id of the person just inserted
});
connection.setAutoCommit(true);
connection.commit(function(err) {
// transaction committed
});
connection.rollback(function(err) {
// transaction rolledback
});
connection.close(); // call this when you are done with the connection
});
The following Out Params are supported in Stored Procedures:
OCCIINT
OCCISTRING
OCCIDOUBLE
OCCIFLOAT
OCCICURSOR
OCCICLOB
OCCIDATE
OCCITIMESTAMP
OCCINUMBER
OCCIBLOB
And can be used as follows:
connection.execute("call myProc(:1,:2)", ["nodejs", new oracle.OutParam(oracle.OCCISTRING)], function(err, results){
console.dir(results);
};
When using Strings as Out Params, the size can be optionally specified as follows:
connection.execute("call myProc(:1,:2)", ["nodejs", new oracle.OutParam(oracle.OCCISTRING, {size: 1000})], function(err, results){
If no size is specified, a default size of 200 chars is used.
See tests for more examples.
The following INOUT param types are supported:
OCCIINT
OCCISTRING
OCCIDOUBLE
OCCIFLOAT
OCCINUMBER
INOUT params are used like normal OUT prams, with the optional 'in' paramater value being passed in the options object:
connection.execute("call myProc(:1)", [new oracle.OutParam(oracle.OCCIINT, {in: 42})], function(err, results){
console.dir(results);
};
sudo dpkg -i oracle-xe_11.2.0.3.0-1.0_i386.deb
sudo apt-get install alien
sudo alien oracle-instantclient11.2-*
sudo dpkg -i oracle-instantclient11.2-*.deb
sudo /etc/init.d/oracle-xe configure
sudo vi /etc/ld.so.conf.d/oracle.conf -- add this line /usr/lib/oracle/11.2/client/lib/
sudo ldconfig
export ORACLE_SID=test
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/11.2/server
export OCI_INCLUDE_DIR=/usr/include/oracle/11.2/client/
export OCI_LIB_DIR=/usr/lib/oracle/11.2/client/lib/
sqlplus test@XE
npm install
npm test
FAQs
Oracle database driver
The npm package oracle receives a total of 604 weekly downloads. As such, oracle popularity was classified as not popular.
We found that oracle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.