support for quote identifiers

This commit is contained in:
Jan Prochazka
2024-08-30 12:20:35 +02:00
parent 075f92ac31
commit 9a39fee663
2 changed files with 25 additions and 5 deletions

View File

@@ -86,17 +86,18 @@ const driver = {
return pool.end();
},
async query(client, sql) {
if (sql.trim() == 'COMMIT;') {
sql = 'COMMIT';
}
if (sql == null) {
return {
rows: [],
columns: [],
};
}
const mtrim = sql.match(/(.*);\s*$/);
if (mtrim) {
sql = mtrim[1];
}
const res = await client.execute(sql);
const columns = extractOracleColumns(res.metaData);
return { rows: (res.rows || []).map(row => zipDataRow(row, columns)), columns };