1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2026-03-24 23:16:18 +08:00

add CSV support #27

This commit is contained in:
lana-k
2021-04-09 16:43:20 +02:00
parent c2864b4308
commit b30eeb6788
23 changed files with 1084 additions and 357 deletions

View File

@@ -104,21 +104,16 @@ export default {
},
methods: {
// Run a command in the database
execute () {
// this.$refs.output.textContent = 'Fetching results...' */
async execute () {
this.isGettingResults = true
this.result = null
this.error = null
return this.$db.execute(this.query + ';')
.then(result => {
this.result = result
})
.catch(err => {
this.error = err
})
.finally(() => {
this.isGettingResults = false
})
try {
this.result = await this.$store.state.db.execute(this.query + ';')
} catch (err) {
this.error = err
}
this.isGettingResults = false
},
handleResize () {
if (this.view === 'chart') {