# README
godal/sql
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
GenericDaoSqland implementsIGenericDao.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.IGenericBoto 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:
- MySQL: github.com/go-sql-driver/mysql
- MSSQL: github.com/denisenkom/go-mssqldb
- Oracle: github.com/godror/godror
- PostgreSQL: github.com/jackc/pgx
- SQLite3: github.com/mattn/go-sqlite3