增加mongodb驱动,简单版本

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

View File

@ -86,7 +86,11 @@ func (that *mongoDb) Get(table string, where Map) Map {
that.LastErr = err that.LastErr = err
return nil return nil
} }
return results[0] if len(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 {