mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-15 14:50:21 +01:00
Fix a few golint naming nits.
This commit is contained in:
parent
b22e778902
commit
e8bb225d94
|
@ -17,13 +17,13 @@ import (
|
||||||
var globalLock sync.RWMutex
|
var globalLock sync.RWMutex
|
||||||
|
|
||||||
const (
|
const (
|
||||||
fetchSql = "SELECT data FROM blocks WHERE pos = ?"
|
fetchSQL = "SELECT data FROM blocks WHERE pos = ?"
|
||||||
existsSql = "SELECT 1 FROM blocks WHERE pos = ?"
|
existsSQL = "SELECT 1 FROM blocks WHERE pos = ?"
|
||||||
updateSql = "UPDATE blocks SET data = ? WHERE pos = ?"
|
updateSQL = "UPDATE blocks SET data = ? WHERE pos = ?"
|
||||||
insertSql = "INSERT INTO blocks (pos, data) VALUES (?, ?)"
|
insertSQL = "INSERT INTO blocks (pos, data) VALUES (?, ?)"
|
||||||
countSql = "SELECT count(*) FROM blocks"
|
countSQL = "SELECT count(*) FROM blocks"
|
||||||
keysSql = "SELECT pos FROM blocks"
|
keysSQL = "SELECT pos FROM blocks"
|
||||||
rangeSql = "SELECT pos, data FROM blocks WHERE pos BETWEEN ? AND ? ORDER BY pos"
|
rangeSQL = "SELECT pos, data FROM blocks WHERE pos BETWEEN ? AND ? ORDER BY pos"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SqliteBackend struct {
|
type SqliteBackend struct {
|
||||||
|
@ -69,37 +69,37 @@ func NewSqliteBackend(
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.existsStmt, err = res.db.Prepare(existsSql); err != nil {
|
if res.existsStmt, err = res.db.Prepare(existsSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.fetchStmt, err = res.db.Prepare(fetchSql); err != nil {
|
if res.fetchStmt, err = res.db.Prepare(fetchSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.insertStmt, err = res.db.Prepare(insertSql); err != nil {
|
if res.insertStmt, err = res.db.Prepare(insertSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.updateStmt, err = res.db.Prepare(updateSql); err != nil {
|
if res.updateStmt, err = res.db.Prepare(updateSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.countStmt, err = res.db.Prepare(countSql); err != nil {
|
if res.countStmt, err = res.db.Prepare(countSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.keysStmt, err = res.db.Prepare(keysSql); err != nil {
|
if res.keysStmt, err = res.db.Prepare(keysSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if res.rangeStmt, err = res.db.Prepare(rangeSql); err != nil {
|
if res.rangeStmt, err = res.db.Prepare(rangeSQL); err != nil {
|
||||||
res.closeAll()
|
res.closeAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user