mirror of
https://github.com/knex/knex.git
synced 2025-07-08 01:21:05 +00:00
36 lines
921 B
JavaScript
36 lines
921 B
JavaScript
const { inherits } = require('util');
|
|
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',
|
|
|
|
datetime: function (withoutTz) {
|
|
let useTz;
|
|
if (isObject(withoutTz)) {
|
|
({ useTz } = withoutTz);
|
|
} else {
|
|
useTz = !withoutTz;
|
|
}
|
|
return useTz ? 'timestamp with local time zone' : 'timestamp';
|
|
},
|
|
|
|
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;
|