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

36 lines
921 B
JavaScript
Raw Normal View History

const { inherits } = require('util');
2021-01-01 17:46:10 +02:00
const ColumnCompiler_Oracle = require('../../oracle/schema/oracle-columncompiler');
const { isObject } = require('../../../util/is');
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;