2020-06-06 05:47:32 +03:00
|
|
|
package schema
|
|
|
|
|
2020-08-27 10:03:57 +03:00
|
|
|
import (
|
|
|
|
"gorm.io/gorm/clause"
|
|
|
|
)
|
2020-06-06 05:47:32 +03:00
|
|
|
|
2024-02-04 10:49:19 +03:00
|
|
|
// ConstraintInterface database constraint interface
|
|
|
|
type ConstraintInterface interface {
|
|
|
|
GetName() string
|
|
|
|
Build() (sql string, vars []interface{})
|
|
|
|
}
|
|
|
|
|
2022-02-16 10:30:43 +03:00
|
|
|
// GormDataTypeInterface gorm data type interface
|
2020-06-06 05:47:32 +03:00
|
|
|
type GormDataTypeInterface interface {
|
|
|
|
GormDataType() string
|
|
|
|
}
|
|
|
|
|
2022-02-16 10:30:43 +03:00
|
|
|
// FieldNewValuePool field new scan value pool
|
|
|
|
type FieldNewValuePool interface {
|
|
|
|
Get() interface{}
|
|
|
|
Put(interface{})
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateClausesInterface create clauses interface
|
2020-06-06 05:47:32 +03:00
|
|
|
type CreateClausesInterface interface {
|
2020-08-17 11:31:09 +03:00
|
|
|
CreateClauses(*Field) []clause.Interface
|
2020-06-06 05:47:32 +03:00
|
|
|
}
|
|
|
|
|
2022-02-16 10:30:43 +03:00
|
|
|
// QueryClausesInterface query clauses interface
|
2020-06-06 05:47:32 +03:00
|
|
|
type QueryClausesInterface interface {
|
2020-08-17 11:31:09 +03:00
|
|
|
QueryClauses(*Field) []clause.Interface
|
2020-06-06 05:47:32 +03:00
|
|
|
}
|
|
|
|
|
2022-02-16 10:30:43 +03:00
|
|
|
// UpdateClausesInterface update clauses interface
|
2020-06-06 05:47:32 +03:00
|
|
|
type UpdateClausesInterface interface {
|
2020-08-17 11:31:09 +03:00
|
|
|
UpdateClauses(*Field) []clause.Interface
|
2020-06-06 05:47:32 +03:00
|
|
|
}
|
|
|
|
|
2022-02-16 10:30:43 +03:00
|
|
|
// DeleteClausesInterface delete clauses interface
|
2020-06-06 05:47:32 +03:00
|
|
|
type DeleteClausesInterface interface {
|
2020-08-17 11:31:09 +03:00
|
|
|
DeleteClauses(*Field) []clause.Interface
|
2020-06-06 05:47:32 +03:00
|
|
|
}
|