loopback/node_modules/oracle-data-source/lib/oracle-data-source.js

51 lines
999 B
JavaScript
Raw Normal View History

2013-04-18 00:43:00 +00:00
/**
* Expose `OracleDataSource`.
*/
module.exports = OracleDataSource;
/**
* Module dependencies.
*/
var DataSource = require('data-source')
, debug = require('debug')('oracle-data-source')
, util = require('util')
, inherits = util.inherits
, assert = require('assert');
/**
* Create a new `OracleDataSource` with the given `options`.
*
* @param {Object} options
* @return {DataSource}
*/
function OracleDataSource(options) {
DataSource.apply(this, arguments);
debug('created with options', options);
}
/**
* Inherit from `AsteroidModule`.
*/
inherits(OracleDataSource, DataSource);
/**
* Define options.
*/
OracleDataSource.options = {
'database': {type: 'string', required: true},
'host': {type: 'string', required: true},
'port': {type: 'number', min: 10, max: 99999},
'username': {type: 'string'},
'password': {type: 'string'}
};
/**
* Provide the oracle jugglingdb adapter
*/
OracleDataSource.prototype.adapter = require('jugglingdb-oracle');