Documentation ¶
Index ¶
- type DAO
- func (d DAO[T]) As(alias string) *DAO[T]
- func (d DAO[T]) Assign(attrs ...field.AssignExpr) *DAO[T]
- func (d DAO[T]) Attrs(attrs ...field.AssignExpr) *DAO[T]
- func (d DAO[T]) Clauses(conds ...clause.Expression) *DAO[T]
- func (d DAO[T]) Create(value *T) error
- func (d DAO[T]) CreateInBatches(values []*T, batchSize int) error
- func (d DAO[T]) CreateMany(values ...*T) error
- func (d DAO[T]) Debug() *DAO[T]
- func (d DAO[T]) Delete() (gen.ResultInfo, error)
- func (d DAO[T]) Distinct(cols ...field.Expr) *DAO[T]
- func (d DAO[T]) Find() ([]*T, error)
- func (d DAO[T]) FindInBatch(batchSize int, fn func(tx gen.Dao, batch int) error) (results []*T, err error)
- func (d DAO[T]) FindInBatches(result *[]*T, batchSize int, fn func(tx gen.Dao, batch int) error) error
- func (d DAO[T]) First() (*T, error)
- func (d DAO[T]) FirstOrCreate() (*T, error)
- func (d DAO[T]) FirstOrInit() (*T, error)
- func (d DAO[T]) Group(cols ...field.Expr) *DAO[T]
- func (d DAO[T]) Having(conds ...gen.Condition) *DAO[T]
- func (d DAO[T]) Join(table schema.Tabler, on ...field.Expr) *DAO[T]
- func (d DAO[T]) Joins(fields ...field.RelationField) *DAO[T]
- func (d DAO[T]) Last() (*T, error)
- func (d DAO[T]) LeftJoin(table schema.Tabler, on ...field.Expr) *DAO[T]
- func (d DAO[T]) Limit(limit int) *DAO[T]
- func (d DAO[T]) Not(conds ...gen.Condition) *DAO[T]
- func (d DAO[T]) Offset(offset int) *DAO[T]
- func (d DAO[T]) Omit(cols ...field.Expr) *DAO[T]
- func (d DAO[T]) Or(conds ...gen.Condition) *DAO[T]
- func (d DAO[T]) Order(conds ...field.Expr) *DAO[T]
- func (d DAO[T]) Paginate(page int, pageSize int) (*pagination.Paginator[*T], error)
- func (d DAO[T]) Preload(fields ...field.RelationField) *DAO[T]
- func (d DAO[T]) ReadDB() *DAO[T]
- func (d DAO[T]) Returning(value any, columns ...string) *DAO[T]
- func (d DAO[T]) RightJoin(table schema.Tabler, on ...field.Expr) *DAO[T]
- func (d DAO[T]) Save(value *T) error
- func (d DAO[T]) SaveMany(values ...*T) error
- func (d DAO[T]) Scopes(scopes ...func(gen.Dao) gen.Dao) *DAO[T]
- func (d DAO[T]) Select(conds ...field.Expr) *DAO[T]
- func (d DAO[T]) Session(config *gorm.Session) *DAO[T]
- func (d DAO[T]) Take() (*T, error)
- func (d DAO[T]) Unscoped() *DAO[T]
- func (d DAO[T]) UseConn(connection *database.Connection) *DAO[T]
- func (d DAO[T]) UseDB(db *gorm.DB) *DAO[T]
- func (d DAO[T]) UseTable(tableName string) *DAO[T]
- func (d DAO[T]) UseTx(tx *gorm.DB) *DAO[T]
- func (d DAO[T]) Where(conds ...gen.Condition) *DAO[T]
- func (d DAO[T]) WithContext(ctx context.Context) *DAO[T]
- func (d DAO[T]) WriteDB() *DAO[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
DAO model
func (DAO[T]) CreateInBatches ¶
func (DAO[T]) CreateMany ¶
func (DAO[T]) FindInBatch ¶
func (DAO[T]) FindInBatches ¶
func (DAO[T]) FirstOrCreate ¶
func (DAO[T]) FirstOrInit ¶
Click to show internal directories.
Click to hide internal directories.