sqliteclidriver: indicate driver in status bar

This commit is contained in:
mappu 2024-06-30 12:48:22 +12:00
parent a7dd1ca340
commit 5c44dc5f54
2 changed files with 12 additions and 0 deletions

View File

@ -3,10 +3,16 @@
package main
import (
"yvbolt/sqliteclidriver"
sqlite3 "github.com/mattn/go-sqlite3"
)
func (ld *sqliteLoadedDatabase) DriverName() string {
if _, ok := ld.db.Driver().(*sqliteclidriver.SCDriver); ok {
return "SQLite (sqliteclidriver)"
}
ver1, _, _ := sqlite3.Version()
return "SQLite " + ver1
}

View File

@ -3,9 +3,15 @@
package main
import (
"yvbolt/sqliteclidriver"
_ "modernc.org/sqlite"
)
func (ld *sqliteLoadedDatabase) DriverName() string {
if _, ok := ld.db.Driver().(*sqliteclidriver.SCDriver); ok {
return "SQLite (sqliteclidriver)"
}
return "SQLite (modernc.org)"
}