Documentation
¶
Index ¶
- func Create() *srDb
- func GetUpdateHelper() abs.DbGetUpdateHelper
- func NewUpdateHelper() abs.DbUpdateHelper
- type FetchOpt
- type Repo
- func (slf *Repo[T]) Count(logc *clog.Instance, whereQuery, endQuery string, wherePars ...interface{}) (int, error)
- func (slf *Repo[T]) CountBy(logc *clog.Instance, condition, end string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) Delete(logc *clog.Instance, whereQuery string, wherePars ...interface{}) error
- func (slf *Repo[T]) DeleteBy(logc *clog.Instance, condition string, pars ...interface{}) error
- func (slf *Repo[T]) DoUpdate(logc *clog.Instance, keyVals map[string]interface{}, whereQuery string, ...) error
- func (slf *Repo[T]) Execute(logc *clog.Instance, sqlQuery string, sqlPars ...interface{}) error
- func (slf *Repo[T]) Fetch(logc *clog.Instance, condition string, args ...interface{}) (*T, error)
- func (slf *Repo[T]) Fetches(logc *clog.Instance, condition string, args ...interface{}) ([]T, error)
- func (slf *Repo[T]) GenerateParamSigns(columnNames string) (paramSign string)
- func (slf *Repo[T]) GetBy(logc *clog.Instance, condition, end string, pars ...interface{}) (*T, error)
- func (slf *Repo[T]) GetData(logc *clog.Instance, whereQuery string, endQuery string, ...) (*T, error)
- func (slf *Repo[T]) GetDatas(logc *clog.Instance, whereQuery string, endQuery string, ...) ([]T, error)
- func (slf *Repo[T]) GetsBy(logc *clog.Instance, condition, end string, pars ...interface{}) ([]T, error)
- func (slf *Repo[T]) Insert(logc *clog.Instance, sqlPars ...interface{}) error
- func (slf *Repo[T]) InsertRID(logc *clog.Instance, sqlPars ...interface{}) (*int64, error)
- func (slf *Repo[T]) RawCount(logc *clog.Instance, query string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) RawFCT(logc *clog.Instance, query string, pars ...interface{}) (fc.FCT, error)
- func (slf *Repo[T]) RawFloat64(logc *clog.Instance, query string, pars ...interface{}) (float64, error)
- func (slf *Repo[T]) RawInt(logc *clog.Instance, query string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) RawInt64(logc *clog.Instance, query string, pars ...interface{}) (int64, error)
- func (slf *Repo[T]) Select(logc *clog.Instance, query string, args ...interface{}) ([]T, error)
- func (slf *Repo[T]) SelectFirst(logc *clog.Instance, query string, args ...interface{}) (*T, error)
- func (slf *Repo[T]) SetColumnNames(names string)
- func (slf *Repo[T]) SetInsertColumnNames(names string)
- func (slf *Repo[T]) Sum(logc *clog.Instance, column, whereQuery, endQuery string, ...) (fc.FCT, error)
- func (slf *Repo[T]) SumBy(logc *clog.Instance, column, condition, end string, pars ...interface{}) (fc.FCT, error)
- func (slf *Repo[T]) TxCount(logc *clog.Instance, tx abs.DbTx, whereQuery, endQuery string, ...) (int, error)
- func (slf *Repo[T]) TxCountBy(logc *clog.Instance, tx abs.DbTx, condition, end string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) TxDelete(logc *clog.Instance, tx abs.DbTx, whereQuery string, wherePars ...interface{}) error
- func (slf *Repo[T]) TxDeleteBy(logc *clog.Instance, tx abs.DbTx, condition string, pars ...interface{}) error
- func (slf *Repo[T]) TxExecute(logc *clog.Instance, tx abs.DbTx, sqlQuery string, sqlPars ...interface{}) error
- func (slf *Repo[T]) TxGetBy(logc *clog.Instance, tx abs.DbTx, condition, end string, pars ...interface{}) (*T, error)
- func (slf *Repo[T]) TxGetData(logc *clog.Instance, tx abs.DbTx, whereQuery string, endQuery string, ...) (*T, error)
- func (slf *Repo[T]) TxGetDatas(logc *clog.Instance, tx abs.DbTx, whereQuery string, endQuery string, ...) ([]T, error)
- func (slf *Repo[T]) TxGetsBy(logc *clog.Instance, tx abs.DbTx, condition, end string, pars ...interface{}) ([]T, error)
- func (slf *Repo[T]) TxInsert(logc *clog.Instance, tx abs.DbTx, sqlPars ...interface{}) error
- func (slf *Repo[T]) TxInsertRID(logc *clog.Instance, tx abs.DbTx, sqlPars ...interface{}) (*int64, error)
- func (slf *Repo[T]) TxRawCount(logc *clog.Instance, tx abs.DbTx, query string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) TxRawFCT(logc *clog.Instance, tx abs.DbTx, query string, pars ...interface{}) (fc.FCT, error)
- func (slf *Repo[T]) TxRawFloat64(logc *clog.Instance, tx abs.DbTx, query string, pars ...interface{}) (float64, error)
- func (slf *Repo[T]) TxRawInt(logc *clog.Instance, tx abs.DbTx, query string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) TxRawInt64(logc *clog.Instance, tx abs.DbTx, query string, pars ...interface{}) (int64, error)
- func (slf *Repo[T]) TxSelect(logc *clog.Instance, tx abs.DbTx, query string, args ...interface{}) ([]T, error)
- func (slf *Repo[T]) TxSelectFirst(logc *clog.Instance, tx abs.DbTx, query string, args ...interface{}) (*T, error)
- func (slf *Repo[T]) TxSum(logc *clog.Instance, tx abs.DbTx, column, whereQuery, endQuery string, ...) (fc.FCT, error)
- func (slf *Repo[T]) TxSumBy(logc *clog.Instance, tx abs.DbTx, column, condition, end string, ...) (fc.FCT, error)
- func (slf *Repo[T]) TxUpdate(logc *clog.Instance, tx abs.DbTx, keyVals map[string]interface{}, ...) error
- func (slf *Repo[T]) TxUpdateBy(logc *clog.Instance, tx abs.DbTx, set, condition string, pars ...interface{}) error
- func (slf *Repo[T]) Update(logc *clog.Instance, sr Update) error
- func (slf *Repo[T]) UpdateBy(logc *clog.Instance, set, condition string, pars ...interface{}) error
- type Update
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUpdateHelper ¶ added in v1.1.21
func GetUpdateHelper() abs.DbGetUpdateHelper
func NewUpdateHelper ¶ added in v1.1.21
func NewUpdateHelper() abs.DbUpdateHelper
Types ¶
type Repo ¶
type Repo[T any] struct { DbInstance abs.DbInstance TableName string ColumnNames string InsertColumnNames string // if empty then use columnNames ParamSigns string InsertParamSign string // if empty then use paramSigns }
func (*Repo[T]) GenerateParamSigns ¶
func (*Repo[T]) RawFloat64 ¶ added in v1.1.32
func (*Repo[T]) SelectFirst ¶ added in v1.1.15
func (*Repo[T]) SetColumnNames ¶ added in v1.0.3
func (*Repo[T]) SetInsertColumnNames ¶ added in v1.0.3
func (*Repo[T]) TxDeleteBy ¶ added in v1.1.46
func (*Repo[T]) TxGetDatas ¶ added in v1.1.18
func (*Repo[T]) TxInsertRID ¶ added in v1.1.18
func (*Repo[T]) TxRawCount ¶ added in v1.1.18
func (*Repo[T]) TxRawFloat64 ¶ added in v1.1.32
func (*Repo[T]) TxRawInt64 ¶ added in v1.1.32
func (*Repo[T]) TxSelectFirst ¶ added in v1.1.18
func (*Repo[T]) TxUpdateBy ¶ added in v1.1.46
Click to show internal directories.
Click to hide internal directories.