fix linting
This commit is contained in:
@@ -167,7 +167,9 @@
|
||||
<div class="flex gap-2 mb-2">
|
||||
<button
|
||||
class="text-sm text-blue-600 hover:text-blue-800 underline"
|
||||
@click="sqlQuery = 'SELECT * FROM sqlite_master WHERE type=\'table\';'"
|
||||
@click="
|
||||
sqlQuery = 'SELECT * FROM sqlite_master WHERE type=\'table\';'
|
||||
"
|
||||
>
|
||||
All Tables
|
||||
</button>
|
||||
@@ -178,7 +180,7 @@
|
||||
placeholder="Enter your SQL query here..."
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-4">
|
||||
<button
|
||||
class="font-bold capitalize bg-slate-500 text-white px-3 py-2 rounded-md mr-2"
|
||||
@@ -189,7 +191,9 @@
|
||||
</div>
|
||||
<div v-if="sqlResult" class="mt-4">
|
||||
<h3 class="text-lg font-semibold mb-2">Result:</h3>
|
||||
<pre class="bg-gray-100 p-4 rounded-md overflow-x-auto">{{ JSON.stringify(sqlResult, null, 2) }}</pre>
|
||||
<pre class="bg-gray-100 p-4 rounded-md overflow-x-auto">{{
|
||||
JSON.stringify(sqlResult, null, 2)
|
||||
}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -532,7 +536,7 @@ export default class Help extends Vue {
|
||||
|
||||
async executeSql() {
|
||||
try {
|
||||
const isSelect = this.sqlQuery.trim().toLowerCase().startsWith('select');
|
||||
const isSelect = this.sqlQuery.trim().toLowerCase().startsWith("select");
|
||||
if (isSelect) {
|
||||
this.sqlResult = await databaseService.query(this.sqlQuery);
|
||||
} else {
|
||||
@@ -548,7 +552,7 @@ export default class Help extends Vue {
|
||||
title: "SQL Error",
|
||||
text: error instanceof Error ? error.message : String(error),
|
||||
},
|
||||
5000
|
||||
5000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user