knex/lib/dialects/oracledb/schema/columncompiler.js

37 lines
910 B
JavaScript
Raw Normal View History

const inherits = require('inherits');
const ColumnCompiler_Oracle = require('../../oracle/schema/columncompiler');
const isObject = require('lodash/isObject');
function ColumnCompiler_Oracledb() {
ColumnCompiler_Oracle.apply(this, arguments);
}
inherits(ColumnCompiler_Oracledb, ColumnCompiler_Oracle);
Object.assign(ColumnCompiler_Oracledb.prototype, {
time: 'timestamp with local time zone',
2020-04-19 00:40:23 +02:00
datetime: function (withoutTz) {
let useTz;
if (isObject(withoutTz)) {
({ useTz } = withoutTz);
} else {
useTz = !withoutTz;
}
return useTz ? 'timestamp with local time zone' : 'timestamp';
},
2020-04-19 00:40:23 +02:00
timestamp: function (withoutTz) {
let useTz;
if (isObject(withoutTz)) {
({ useTz } = withoutTz);
} else {
useTz = !withoutTz;
}
return useTz ? 'timestamp with local time zone' : 'timestamp';
},
});
module.exports = ColumnCompiler_Oracledb;