diff --git a/src/views/TestView.vue b/src/views/TestView.vue
index c0c9b04d..1e19a68f 100644
--- a/src/views/TestView.vue
+++ b/src/views/TestView.vue
@@ -68,10 +68,18 @@
placeholder="Enter your SQL query here..."
>
-
+
+
Result:
@@ -401,6 +409,7 @@ export default class Help extends Vue {
// for SQL operations
sqlQuery = "";
sqlResult: unknown = null;
+ returnRawResults = false;
cryptoLib = cryptoLib;
@@ -961,15 +970,28 @@ export default class Help extends Vue {
* Supports both SELECT queries (dbQuery) and other SQL commands (dbExec)
* Provides interface for testing raw SQL operations
* Uses PlatformServiceMixin for database access and notification helpers for errors
+ * When returnRawResults is true, uses direct platform service methods for unparsed results
*/
async executeSql() {
try {
const isSelect = this.sqlQuery.trim().toLowerCase().startsWith("select");
- if (isSelect) {
- this.sqlResult = await this.$query(this.sqlQuery);
+
+ if (this.returnRawResults) {
+ // Use direct platform service methods for raw, unparsed results
+ if (isSelect) {
+ this.sqlResult = await this.$dbQuery(this.sqlQuery);
+ } else {
+ this.sqlResult = await this.$dbExec(this.sqlQuery);
+ }
} else {
- this.sqlResult = await this.$exec(this.sqlQuery);
+ // Use methods that normalize the result objects
+ if (isSelect) {
+ this.sqlResult = await this.$query(this.sqlQuery);
+ } else {
+ this.sqlResult = await this.$exec(this.sqlQuery);
+ }
}
+
logger.log("Test SQL Result:", this.sqlResult);
} catch (error) {
logger.error("Test SQL Error:", error);