A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.
DB.TableMapper
to support using common prefix/suffix with table names when performing model-based queries. (Thanks to @kPshi !)DB.WithContext()
to support getting a DB instance with a context. This is useful for creating queries with context.DB.QueryLogFunc
and DB.ExecLogFunc
to support more flexible logging and profiling.Added support for using context.Context with SelectQuery
Added go mod
support.
context.Context
tx.Rollback
and tx.Commit
can be called within DB.Transactional
now without causing sql.ErrTxDone
error.Query.All()
will now initialize the slice to be empty (not nil) if the query result is empty.DB.Clone()
that contained the reference to the old DB instance.DB.Clone()
DB.Wrap()