feat: fix raw results to really show the raw DB results

This commit is contained in:
2025-09-16 21:08:22 -06:00
parent 2a932af806
commit 297fe3cec6
5 changed files with 66 additions and 6 deletions

View File

@@ -78,7 +78,7 @@
type="checkbox"
class="rounded border-gray-300"
/>
<span class="text-sm">Return Raw Results</span>
<span class="text-sm">Return Raw Results (only raw for queries)</span>
</label>
</div>
<div v-if="sqlResult" class="mt-4">
@@ -975,13 +975,13 @@ export default class Help extends Vue {
async executeSql() {
try {
const isSelect = this.sqlQuery.trim().toLowerCase().startsWith("select");
if (this.returnRawResults) {
// Use direct platform service methods for raw, unparsed results
if (isSelect) {
this.sqlResult = await this.$dbQuery(this.sqlQuery);
this.sqlResult = await this.$dbRawQuery(this.sqlQuery);
} else {
this.sqlResult = await this.$dbExec(this.sqlQuery);
this.sqlResult = await this.$exec(this.sqlQuery);
}
} else {
// Use methods that normalize the result objects
@@ -991,7 +991,7 @@ export default class Help extends Vue {
this.sqlResult = await this.$exec(this.sqlQuery);
}
}
logger.log("Test SQL Result:", this.sqlResult);
} catch (error) {
logger.error("Test SQL Error:", error);