package
0.6.1
Repository: https://github.com/btnguyen2k/godal.git
Documentation: pkg.go.dev

# README

godal/mongo

PkgGoDev codecov

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.