新增 本地 setu 插件

This commit is contained in:
fumiama
2021-11-29 15:33:15 +08:00
parent d8a41a5ee1
commit 89121cfc57
9 changed files with 221 additions and 21 deletions

View File

@@ -143,6 +143,11 @@ func (db *Sqlite) Find(table string, objptr interface{}, condition string) error
return err
}
// Pick 从 table 随机一行
func (db *Sqlite) Pick(table string, objptr interface{}) error {
return db.Find(table, objptr, "ORDER BY RANDOM() limit 1")
}
// ListTables 列出所有表名
// 返回所有表名+错误
func (db *Sqlite) ListTables() (s []string, err error) {