Documentation ¶
Index ¶
Constants ¶
View Source
const SqlTxContext = "SqlTxContext"
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize()
Initialize start connection with sql database and execute migration
func NewTransaction ¶
func NewTransaction(isolation ...sql.IsolationLevel) transaction.Transaction
NewTransaction creates new sqlTransaction with implements a transaction.Transaction
Types ¶
type PageQuery ¶
type PageQuery[T any] struct { // contains filtered or unexported fields }
PageQuery struct
func NewPageQuery ¶
func NewPageQuery[T any](ctx context.Context, page *types.PageRequest, query string, params ...interface{}) *PageQuery[T]
NewPageQuery create a new pointer to PageQuery struct
type Query ¶
type Query[T any] struct { // contains filtered or unexported fields }
Query struct
func NewCachedQuery ¶
func NewCachedQuery[T any](ctx context.Context, cache *cacheDB.Cache[T], query string, params ...any) (q *Query[T])
NewCachedQuery create a new pointer to Query struct with cache
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
Statement struct
func NewStatement ¶
NewStatement create a new pointer to Statement struct
Click to show internal directories.
Click to hide internal directories.