mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
oracle fix WIP
This commit is contained in:
parent
9a39fee663
commit
be0be4d0a0
@ -93,14 +93,23 @@ const driver = {
|
||||
};
|
||||
}
|
||||
|
||||
const mtrim = sql.match(/(.*);\s*$/);
|
||||
const mtrim = sql.match(/^(.*);\s*$/s);
|
||||
if (mtrim) {
|
||||
sql = mtrim[1];
|
||||
}
|
||||
|
||||
console.log('************************ RUN ORACLE QUERY', sql);
|
||||
|
||||
const res = await client.execute(sql);
|
||||
try {
|
||||
const columns = extractOracleColumns(res.metaData);
|
||||
return { rows: (res.rows || []).map(row => zipDataRow(row, columns)), columns };
|
||||
} catch (err) {
|
||||
return {
|
||||
rows: [],
|
||||
columns: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
stream(client, sql, options) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user