formatter.js
1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';
exports.__esModule = true;
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = require('babel-runtime/helpers/inherits');
var _inherits3 = _interopRequireDefault(_inherits2);
var _formatter = require('../../formatter');
var _formatter2 = _interopRequireDefault(_formatter);
var _utils = require('./utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Oracle_Formatter = function (_Formatter) {
(0, _inherits3.default)(Oracle_Formatter, _Formatter);
function Oracle_Formatter() {
(0, _classCallCheck3.default)(this, Oracle_Formatter);
return (0, _possibleConstructorReturn3.default)(this, _Formatter.apply(this, arguments));
}
Oracle_Formatter.prototype.alias = function alias(first, second) {
return first + ' ' + second;
};
Oracle_Formatter.prototype.parameter = function parameter(value, notSetValue) {
// Returning helper uses always ROWID as string
if (value instanceof _utils.ReturningHelper && this.client.driver) {
value = new this.client.driver.OutParam(this.client.driver.OCCISTRING);
} else if (typeof value === 'boolean') {
value = value ? 1 : 0;
}
return _Formatter.prototype.parameter.call(this, value, notSetValue);
};
return Oracle_Formatter;
}(_formatter2.default);
exports.default = Oracle_Formatter;
module.exports = exports['default'];