small fixes

This commit is contained in:
zadam
2021-10-03 10:42:46 +02:00
parent a1c1c7c830
commit 75fc9e2048
4 changed files with 13 additions and 2 deletions

View File

@@ -40,6 +40,15 @@ export default class SqlResultWidget extends NoteContextAwareWidget {
this.$resultContainer.empty();
for (const rows of results) {
if (typeof rows === 'object' && !Array.isArray(rows)) {
// inserts, updates
this.$resultContainer.empty().show().append(
$("<pre>").text(JSON.stringify(rows, null, '\t'))
);
continue;
}
if (!rows.length) {
continue;
}