Documentation
¶
Index ¶
- func Delete(db *gorm.DB, tableName string, column string, value any) error
- func DeleteById(db *gorm.DB, tableName string, id uint64) error
- func Exists(db *gorm.DB, tableName, column string, value interface{}, withDeletedAt bool) (bool, error)
- func ExistsByColumn(db *gorm.DB, tableName, column string, value interface{}) (bool, error)
- func ExistsByColumnWithDeletedAt(db *gorm.DB, tableName, column string, value interface{}) (bool, error)
- func ExistsByFilterExprs(db *gorm.DB, tableName string, filters sqlx.FilterExprs) (bool, error)
- func ExistsByQuery(db *gorm.DB, qsql string, value ...any) (bool, error)
- func ExistsBySQL(db *gorm.DB, sql string, value ...any) (bool, error)
- func GetById[T any](db *gorm.DB, id any) (*T, error)
- func NewDBWithContext(db *gorm.DB, ctx context.Context) *gorm.DB
- func NewDBWithLogger(db *gorm.DB, log *log.Logger, conf *logger.Config) *gorm.DB
- func NewTraceDB(db *gorm.DB, ctx context.Context, traceId string) *gorm.DB
- func TableName(tx *gorm.DB, name string) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExistsByColumn ¶
func ExistsByFilterExprs ¶
func ExistsByQuery ¶
根据查询语句查询数据是否存在
func NewDBWithLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.