Fix bag remove to SQLite
Still not perfect, but the problem comming from go-sqlite3 library
This commit is contained in:
parent
7d9cf97445
commit
fcaa5a01bc
|
|
@ -88,14 +88,13 @@ func (newLine *DatabaseLine) UpdateLine() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RemoveLine(jid string) bool {
|
func RemoveLine(jid string) bool {
|
||||||
|
// Update Steam login and password to blank before deleting,
|
||||||
|
// because it is not really deleted in the SQLite file.
|
||||||
line := new(DatabaseLine)
|
line := new(DatabaseLine)
|
||||||
line.Jid = jid
|
line.Jid = jid
|
||||||
return line.UpdateLine()
|
line.UpdateLine()
|
||||||
|
|
||||||
// FIXME not working
|
|
||||||
/*
|
|
||||||
log.Printf("%sRemove line %s", LogInfo, jid)
|
log.Printf("%sRemove line %s", LogInfo, jid)
|
||||||
|
|
||||||
stmt, err := db.Prepare(deleteDatabaseStmt)
|
stmt, err := db.Prepare(deleteDatabaseStmt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("%sError on delete jid %s", LogError, jid, err)
|
log.Printf("%sError on delete jid %s", LogError, jid, err)
|
||||||
|
|
@ -114,11 +113,11 @@ func RemoveLine(jid string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if affect == 0 {
|
if affect == 0 {
|
||||||
|
log.Printf("%sNo line affected", LogDebug)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetLine(jid string) *DatabaseLine {
|
func GetLine(jid string) *DatabaseLine {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue