2018-07-09 08:10:34 -04:00
|
|
|
const inherits = require('inherits');
|
2016-06-20 17:03:52 +02:00
|
|
|
const ColumnCompiler_Oracle = require('../../oracle/schema/columncompiler');
|
|
|
|
|
2020-04-18 20:41:23 +03:00
|
|
|
const isObject = require('lodash/isObject');
|
2016-06-20 17:03:52 +02:00
|
|
|
|
|
|
|
function ColumnCompiler_Oracledb() {
|
|
|
|
ColumnCompiler_Oracle.apply(this, arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
inherits(ColumnCompiler_Oracledb, ColumnCompiler_Oracle);
|
|
|
|
|
2019-07-10 22:38:20 +02:00
|
|
|
Object.assign(ColumnCompiler_Oracledb.prototype, {
|
2016-06-20 17:03:52 +02:00
|
|
|
time: 'timestamp with local time zone',
|
|
|
|
|
2020-04-19 00:40:23 +02:00
|
|
|
datetime: function (withoutTz) {
|
2019-05-19 17:40:59 +05:30
|
|
|
let useTz;
|
|
|
|
if (isObject(withoutTz)) {
|
|
|
|
({ useTz } = withoutTz);
|
|
|
|
} else {
|
|
|
|
useTz = !withoutTz;
|
|
|
|
}
|
|
|
|
return useTz ? 'timestamp with local time zone' : 'timestamp';
|
2016-06-20 17:03:52 +02:00
|
|
|
},
|
|
|
|
|
2020-04-19 00:40:23 +02:00
|
|
|
timestamp: function (withoutTz) {
|
2019-05-19 17:40:59 +05:30
|
|
|
let useTz;
|
|
|
|
if (isObject(withoutTz)) {
|
|
|
|
({ useTz } = withoutTz);
|
|
|
|
} else {
|
|
|
|
useTz = !withoutTz;
|
|
|
|
}
|
|
|
|
return useTz ? 'timestamp with local time zone' : 'timestamp';
|
2018-07-09 08:10:34 -04:00
|
|
|
},
|
2016-06-20 17:03:52 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = ColumnCompiler_Oracledb;
|