mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 14:26:00 +00:00
fixed display CLOB an NCLOB columns in Oracle #944
This commit is contained in:
@@ -3,7 +3,7 @@ const stream = require('stream');
|
|||||||
|
|
||||||
const driverBase = require('../frontend/driver');
|
const driverBase = require('../frontend/driver');
|
||||||
const Analyser = require('./Analyser');
|
const Analyser = require('./Analyser');
|
||||||
const { createBulkInsertStreamBase, makeUniqueColumnNames } = global.DBGATE_PACKAGES['dbgate-tools'];
|
const { makeUniqueColumnNames } = global.DBGATE_PACKAGES['dbgate-tools'];
|
||||||
const createOracleBulkInsertStream = require('./createOracleBulkInsertStream');
|
const createOracleBulkInsertStream = require('./createOracleBulkInsertStream');
|
||||||
|
|
||||||
let platformInfo;
|
let platformInfo;
|
||||||
@@ -12,16 +12,11 @@ let oracledbValue;
|
|||||||
function getOracledb() {
|
function getOracledb() {
|
||||||
if (!oracledbValue) {
|
if (!oracledbValue) {
|
||||||
oracledbValue = require('oracledb');
|
oracledbValue = require('oracledb');
|
||||||
|
oracledbValue.fetchAsString = [oracledbValue.CLOB, oracledbValue.NCLOB];
|
||||||
}
|
}
|
||||||
return oracledbValue;
|
return oracledbValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
pg.types.setTypeParser(1082, 'text', val => val); // date
|
|
||||||
pg.types.setTypeParser(1114, 'text', val => val); // timestamp without timezone
|
|
||||||
pg.types.setTypeParser(1184, 'text', val => val); // timestamp
|
|
||||||
*/
|
|
||||||
|
|
||||||
function extractOracleColumns(result) {
|
function extractOracleColumns(result) {
|
||||||
if (!result /*|| !result.fields */) return [];
|
if (!result /*|| !result.fields */) return [];
|
||||||
const res = result.map(fld => ({
|
const res = result.map(fld => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user