feat: fix raw results to really show the raw DB results
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user