Socket
Book a DemoInstallSign in
Socket

egg-oracle

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-oracle

Oracle database plugin for egg

4.0.1
latest
Source
npmnpm
Version published
Weekly downloads
31
244.44%
Maintainers
1
Weekly downloads
 
Created
Source

egg-oracle

NPM version David deps Known Vulnerabilities npm download

Install

See Quick Start Node-oracledb Installation.

$ npm i egg-oracle --save

Usage

  • enable plugin
// {app_root}/config/plugin.js
exports.oracle = {
  enable: true,
  package: 'egg-oracle',
};
  • oracle connection pool attach in app
// {app_root}/app/service/my_service.js
'use strict';
const Service = require('egg').Service;

class MyService extends Service {
  // example for getConnection
  async foo() {
    const connection = await this.app.oracle.getConnection();
    const result = await connnection.execute('SELECT sysdate AS "date" FROM dual');
    connection.close();
    console.log(result.rows[0].date);
  }
}
module.exports = MyService;

Documentation

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

Configuration

// {app_root}/config/config.default.js
exports.oracle = {
  client: {
    user: 'user',
    password: 'password',
    connectString: 'localhost/orcl',
  },
};

see config/config.default.js for more detail.

Example

License

MIT

Keywords

egg

FAQs

Package last updated on 19 Sep 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.