mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-01-11 07:49:01 +08:00
✏️ 修复 control 全局禁用
This commit is contained in:
parent
ab34930beb
commit
876d85ac4e
@ -3,6 +3,7 @@ package sql
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
"errors"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -129,6 +130,10 @@ func (db *Sqlite) Find(table string, objptr interface{}, condition string) error
|
|||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
|
if !rows.Next() {
|
||||||
|
return errors.New("sql.Find: null result")
|
||||||
|
}
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user