Documentation ¶
Index ¶
- Variables
- func GetById[T any](db *gorm.DB, id int) (*T, error)
- func GetDB(db *gorm.DB, log *log.Logger, conf *logger.Config) *gorm.DB
- func New2(loger *zap.Logger, conf *logger.Config) logger.Interface
- type ChainDao
- type Config
- type DB
- type DB2
- type FilterExpressions
- type GORMConfig
- type ModelTime
- type Repository
- type SQLLogger
- func (l *SQLLogger) Error(ctx context.Context, msg string, data ...interface{})
- func (l *SQLLogger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *SQLLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *SQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *SQLLogger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type FilterExpressions ¶
type FilterExpressions []dbi.FilterExpression
type GORMConfig ¶
func (*GORMConfig) Init ¶
func (c *GORMConfig) Init()
type Repository ¶
func NewRepository ¶
func (*Repository[T]) Create ¶
func (r *Repository[T]) Create(t *T) error
func (*Repository[T]) Delete ¶
func (r *Repository[T]) Delete(id int) error
func (*Repository[T]) Read ¶
func (r *Repository[T]) Read(id int) (*T, error)
func (*Repository[T]) Update ¶
func (r *Repository[T]) Update(t *T) error
type SQLLogger ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.