Documentation
¶
Index ¶
- Variables
- func GetProject(tx *TX, options ...Option) (*model.ErdaProject, bool, error)
- func Init(db *gorm.DB)
- func NotSoftDeleted(db *gorm.DB) *gorm.DB
- func Value(value interface{}) whereValue
- type Column
- type Option
- type Order
- type OrderColumn
- type SetColumn
- type TX
- func (tx *TX) CommitOrRollback()
- func (tx *TX) Create(i interface{}) error
- func (tx *TX) CreateInBatches(i interface{}, size int) error
- func (tx *TX) DB() *gorm.DB
- func (tx *TX) Delete(i interface{}, options ...Option) error
- func (tx *TX) Get(i interface{}, options ...Option) (bool, error)
- func (tx *TX) List(i interface{}, options ...Option) (int64, error)
- func (tx *TX) UpdateColumns(i interface{}, options ...Option) error
- func (tx *TX) Updates(i, v interface{}, options ...Option) error
- type WhereColumn
- type WhereValue
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidTransactionError = errors.New("invalid transaction, it is already committed or roll backed")
Functions ¶
func GetProject ¶
Types ¶
type Column ¶
type Column interface {
WhereColumn
OrderColumn
SetColumn
}
type OrderColumn ¶
type TX ¶
type TX struct {
Error error
// contains filtered or unexported fields
}
func (*TX) CommitOrRollback ¶
func (tx *TX) CommitOrRollback()
func (*TX) CreateInBatches ¶
func (*TX) UpdateColumns ¶
type WhereColumn ¶
type WhereColumn interface {
Is(value interface{}) Option
In(values ...interface{}) Option
InMap(values map[interface{}]struct{}) Option
Like(value interface{}) Option
GreaterThan(value interface{}) Option
EqGreaterThan(value interface{}) Option
LessThan(value interface{}) Option
EqLessThan(value interface{}) Option
}
type WhereValue ¶
Click to show internal directories.
Click to hide internal directories.