Documentation ¶
Index ¶
- func Create() *srDb
- type Repo
- func (slf *Repo[T]) Count(cli *clog.Instance, whereQuery, endQuery string, wherePars ...interface{}) (int, error)
- func (slf *Repo[T]) Delete(cli *clog.Instance, whereQuery string, wherePars ...interface{}) error
- func (slf *Repo[T]) Execute(cli *clog.Instance, sqlQuery string, sqlPars ...interface{}) error
- func (slf *Repo[T]) GenerateParamSigns(columnNames string) (paramSign string)
- func (slf *Repo[T]) GetData(cli *clog.Instance, whereQuery string, endQuery string, ...) (*T, error)
- func (slf *Repo[T]) GetDatas(cli *clog.Instance, whereQuery string, endQuery string, ...) ([]T, error)
- func (slf *Repo[T]) Insert(cli *clog.Instance, sqlPars ...interface{}) error
- func (slf *Repo[T]) OnUnsafe(unsafe *model.DbUnsafeSelectError)
- func (slf *Repo[T]) RawCount(cli *clog.Instance, query string, pars ...interface{}) (int, error)
- func (slf *Repo[T]) Select(cli *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]) Update(cli *clog.Instance, keyVals map[string]interface{}, whereQuery string, ...) error
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 PrintUnsafeErr bool }
func (*Repo[T]) GenerateParamSigns ¶
func (*Repo[T]) OnUnsafe ¶
func (slf *Repo[T]) OnUnsafe(unsafe *model.DbUnsafeSelectError)
func (*Repo[T]) SetColumnNames ¶ added in v1.0.3
func (*Repo[T]) SetInsertColumnNames ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.