interfaces.go 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package schema
  2. import (
  3. "gorm.io/gorm/clause"
  4. )
  5. // ConstraintInterface database constraint interface
  6. type ConstraintInterface interface {
  7. GetName() string
  8. Build() (sql string, vars []interface{})
  9. }
  10. // GormDataTypeInterface gorm data type interface
  11. type GormDataTypeInterface interface {
  12. GormDataType() string
  13. }
  14. // FieldNewValuePool field new scan value pool
  15. type FieldNewValuePool interface {
  16. Get() interface{}
  17. Put(interface{})
  18. }
  19. // CreateClausesInterface create clauses interface
  20. type CreateClausesInterface interface {
  21. CreateClauses(*Field) []clause.Interface
  22. }
  23. // QueryClausesInterface query clauses interface
  24. type QueryClausesInterface interface {
  25. QueryClauses(*Field) []clause.Interface
  26. }
  27. // UpdateClausesInterface update clauses interface
  28. type UpdateClausesInterface interface {
  29. UpdateClauses(*Field) []clause.Interface
  30. }
  31. // DeleteClausesInterface delete clauses interface
  32. type DeleteClausesInterface interface {
  33. DeleteClauses(*Field) []clause.Interface
  34. }