Skip to content

Commit

Permalink
Merge commit 'refs/pull/26/head' of https://github.com/hackolade/Oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesmarets committed Jul 7, 2022
2 parents c8df068 + 205fb4c commit 3b06d03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reverse_engineering/helpers/oracleHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,10 @@ const getJsonSchema = async (jsonColumns, records) => {

const getViewDDL = async (viewName, logger) => {
try {
await setSQLTerminator();
const queryResult = await execute(`SELECT DBMS_METADATA.GET_DDL('VIEW', VIEW_NAME, OWNER) FROM ALL_VIEWS WHERE VIEW_NAME='${viewName}'`);

return `${(await _.first(_.first(queryResult)).getData())};`;
const viewDDL = await _.first(_.first(queryResult)).getData();
return viewDDL;
} catch (err) {
logger.log('error', {
message: 'Cannot get DDL for view: ' + viewName,
Expand Down

0 comments on commit 3b06d03

Please sign in to comment.