Documentation ¶
Index ¶
- Variables
- func CheckExist(executor Executor, executeParams *sql.CheckExistExecuteParams) (bool, error)
- func CheckHasOnlyOne(executor Executor, executeParams *sql.CheckHasOnlyOneExecuteParams) (bool, error)
- func Count(executor Executor, executeParams *sql.CountExecuteParams) (int64, error)
- func Delete(executor Executor, executeParams *sql.DeleteExecuteParams) error
- func DeleteEntity(executor Executor, tableName string, e any) error
- func ExecuteRawSql(executor Executor, sql string, executeParams map[string]any, args ...any) ([]sql.Result, error)
- func ExecuteSql(executor Executor, name string, args ...any) ([]sql.Result, error)
- func ExecuteSqlTemplate(executor Executor, name string, executeParams map[string]any, args ...any) ([]sql.Result, error)
- func Insert(executor Executor, executeParams *sql.InsertExecuteParams) error
- func InsertBatch(executor Executor, executeParams *sql.InsertBatchExecuteParams) error
- func InsertEntity(executor Executor, tableName string, es any) error
- func IsErrorDBRecordHasExist(err error) bool
- func IsErrorDBRecordNotExist(err error) bool
- func Query(executor Executor, executeParams *sql.QueryExecuteParams) ([]sql.Result, int64, error)
- func QueryOne(executor Executor, executeParams *sql.QueryOneExecuteParams) (sql.Result, error)
- func Transaction(executor Executor, txFunc func(tx Executor) error) error
- func Update(executor Executor, executeParams *sql.UpdateExecuteParams) error
- func UpdateEntity(executor Executor, tableName string, e any) error
- type Executor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDBRecordHasExist = errors.New("记录已存在") ErrDBRecordNotExist = errors.New("记录不存在") )
Functions ¶
func CheckExist ¶
func CheckExist(executor Executor, executeParams *sql.CheckExistExecuteParams) (bool, error)
func CheckHasOnlyOne ¶
func CheckHasOnlyOne(executor Executor, executeParams *sql.CheckHasOnlyOneExecuteParams) (bool, error)
func ExecuteRawSql ¶
func ExecuteSql ¶
func ExecuteSqlTemplate ¶ added in v0.11.1
func InsertBatch ¶
func InsertBatch(executor Executor, executeParams *sql.InsertBatchExecuteParams) error
func IsErrorDBRecordHasExist ¶
func IsErrorDBRecordNotExist ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.