sequelize-plugin-oracle
v6.6.5
Published
Oracle dialect for sequelize
Downloads
43
Maintainers
Readme
⚠️ Deprecated ⚠️
Since
[email protected]
, Oracle is now supported officially.
sequelize-plugin-oracle
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 😅.