# README
godal/mongo
Generic MongoDB DAO implementation.
Guideline
General
- DAOs must implement
IGenericDao.GdaoCreateFilter(string, IGenericBo) FilterOpt
.
Use GenericDaoMongo
(and godal.IGenericBo
) directly
- Define a DAO struct that implements
IGenericDao.GdaoCreateFilter(string, IGenericBo) FilterOpt
.
Implement custom MongoDB business DAOs and BOs
- Define and implement the business DAO (Note: DAOs must implement
IGenericDao.GdaoCreateFilter(string, IGenericBo) FilterOpt
). - Define functions to transform
godal.IGenericBo
to business BO and vice versa.
Optionally, create a helper function to create DAO instances.
Examples: see examples and examples_sta.
This package uses go.mongodb.org/mongo-driver/mongo as MongoDB driver.