npm.io
6.6.5 • Published 2 years ago

sequelize-plugin-oracle

Licence
MIT
Version
6.6.5
Deps
1
Size
107 kB
Vulns
0
Weekly
0

Deprecated

Since sequelize@6.22.0, Oracle is now supported officially.

sequelize-plugin-oracle

npm sequelize-plugin-oracle package

This plugin adds oracle support to an independent sequelize installation at run time. The dialect is based on ts-sequelize, but it uses the native pooling of oracledb.

Compatibility

sequelize-plugin-oracle sequelize
>= 6.2 >= 6.16
6.1 6.14 to 6.15
6.0 6.13

Prerequisites

This plugin requires sequelize and oracledb to be installed. They are not peerDependencies of this package, so the developer has to make sure it works together.

Usage

// load oracle dialect...
import 'sequelize-plugin-oracle';
// now you can use sequelize with oracle dbs.
import {Sequelize} from 'sequelize';

// or everything in one line
// (sequelize-plugin-oracle exports sequelize)
import {Sequelize} from 'sequelize-plugin-oracle';

const sequelize = new Sequelize('oracle://...');

How does it work?

When required, it overrides/wraps certain functions of sequelize to register the Oracle dialect. That's kinda hacky, but it seems to work .

Keywords