Generic Database Access Layer implementation in Golang.
- Bug fixes.
- More tests.
- Bug fixes & enhancements.
- Update docs & dependency libs.
- New package
dynamodb
: provides a generic AWS DynamoDB implementation ofgodal.IGenericDao
. GenericDaoSql
:- Fix nil-pointer bug when passing
nil
filter/sorting. SqlExecute()
andSqlQuery()
: always use prepared statement (also fix a bug that int/float columns are returned as []byte)
- Fix nil-pointer bug when passing
GenericRowMapperSql
:- Add
GboFieldToColNameTranslator
andColNameToGboFieldTranslator
: define rules to translate column names to field names and vice versa.
- Add
- Breaking changes:
ColummNameTransformation
renamed toNameTransformation
- Constants
ColNameTransIntact
,ColNameTransUpperCase
andColNameTransLowerCase
renamed toNameTransfIntact
,NameTransfUpperCase
andNameTransfLowerCase
. GenericRowMapperSql.ColNameTrans
renamed toNameTransformation
.
- Update docs & dependency libs.
- Removed deprecated functions.
- Other fixes & enhancements.
- Breaking changes:
- Move
AbstractGenericDao.GdaoDelete(...)
to sub-classes (GenericDaoMongo
andGenericDaoSql
) IGenericDao
:GdaoCreate
,GdaoUpdate
andGdaoSave
return(0, GdaoErrorDuplicatedEntry)
if written row violate data integrity (duplicated key or unique index)
- Move
- Add transaction-supported functions to
GenericDaoMongo
andGenericDaoSql
. GenericDaoSql
:- New method
WrapTransaction(ctx context.Context, func(ctx context.Context, tx *sql.Tx) error) error
- New method
- More tests
- Update dependency libs
- Other fixes & enhancements
GenericBo
: new functionChecksum() []byte
GenericDaoMongo
:- New method
WrapTransaction(ctx context.Context, txFunc func(sctx mongo.SessionContext) error) error
- Add tests
- Fixes & Enhancements
- New method
GenericDaoSql
:- Add tests
- Fixes & Enhancements
- Update dependency libs
- Other fixes & enhancements
- Upgrade dependency libs.
- Migrate to Go modular design.
- Generic database/sql DAO implementation:
GenericDaoSql
- Generic business object:
- Interface
IGenericBo
& implementationGenericBo
- Interface
- Generic data access object:
- Interface
IGenericDao
& abstract implementationAbstractGenericDao
- Interface
- Generic MongoDB DAO implementation:
GenericDaoMongo
MIT - see LICENSE.md.