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

# README

godal/sql

PkgGoDev codecov

Generic database/sql DAO implementation.

Guideline

General

  • DAOs must implement IGenericDao.GdaoCreateFilter(string, IGenericBo) FilterOpt.

Use GenericDaoSql (and godal.IGenericBo) directly

  • Define a DAO struct that extends GenericDaoSql and implements IGenericDao.GdaoCreateFilter(string, IGenericBo) FilterOpt.

Implement custom database/sql 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.

While this package does not use a specific SQL driver, it is highly recommended to use the following SQL drivers with godal/sql: