增加mongodb驱动,简单版本

This commit is contained in:
hoteas 2022-08-30 04:05:17 +08:00
parent a32c3a1589
commit 30edb4d9fa

View File

@ -86,8 +86,12 @@ func (that *mongoDb) Get(table string, where Map) Map {
that.LastErr = err that.LastErr = err
return nil return nil
} }
if len(results) > 0 {
return results[0] return results[0]
} }
return nil
}
func (that mongoDb) Select(table string, where Map, page, pageRow int64) []Map { func (that mongoDb) Select(table string, where Map, page, pageRow int64) []Map {
page = (page - 1) * pageRow page = (page - 1) * pageRow