Documentation ¶
Index ¶
- type DeletedAt
- func (DeletedAt) CreateClauses(f *schema.Field) []clause.Interface
- func (DeletedAt) DeleteClauses(f *schema.Field) []clause.Interface
- func (n DeletedAt) MarshalJSON() ([]byte, error)
- func (n DeletedAt) MustValue() time.Time
- func (DeletedAt) QueryClauses(f *schema.Field) []clause.Interface
- func (n *DeletedAt) Scan(value interface{}) error
- func (n *DeletedAt) UnmarshalJSON(b []byte) error
- func (DeletedAt) UpdateClauses(f *schema.Field) []clause.Interface
- func (n DeletedAt) Value() (driver.Value, error)
- type SoftDeleteCreateClause
- type SoftDeleteDeleteClause
- type SoftDeleteQueryClause
- type SoftDeleteUpdateClause
- type UUID
- type UUIDCreateClause
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeletedAt ¶
DeletedAt on delete: the field value will be set to the current datetime. on query: the record will be not returned if it is soft-deleted. if you want to find the record which is soft-deleted, or you want to delete the record forever, you can use db.Unscoped().Find(&users), and db.Unscoped().Delete(&order).
func (DeletedAt) CreateClauses ¶
CreateClauses .
func (DeletedAt) DeleteClauses ¶
DeleteClauses .
func (DeletedAt) MustValue ¶
MustValue returns zero timestamp if the value is null; returns time value if the value is not null. if the value is null returns
func (DeletedAt) QueryClauses ¶
QueryClauses .
func (DeletedAt) UpdateClauses ¶
UpdateClauses .
type SoftDeleteCreateClause ¶
SoftDeleteCreateClause .
func (SoftDeleteCreateClause) Build ¶
func (sd SoftDeleteCreateClause) Build(clause.Builder)
Build .
func (SoftDeleteCreateClause) MergeClause ¶
func (sd SoftDeleteCreateClause) MergeClause(*clause.Clause)
MergeClause .
func (SoftDeleteCreateClause) ModifyStatement ¶
func (sd SoftDeleteCreateClause) ModifyStatement(stmt *gorm.Statement)
ModifyStatement .
type SoftDeleteDeleteClause ¶
SoftDeleteDeleteClause .
func (SoftDeleteDeleteClause) Build ¶
func (sd SoftDeleteDeleteClause) Build(clause.Builder)
Build .
func (SoftDeleteDeleteClause) MergeClause ¶
func (sd SoftDeleteDeleteClause) MergeClause(*clause.Clause)
MergeClause .
func (SoftDeleteDeleteClause) ModifyStatement ¶
func (sd SoftDeleteDeleteClause) ModifyStatement(stmt *gorm.Statement)
ModifyStatement .
type SoftDeleteQueryClause ¶
SoftDeleteQueryClause .
func (SoftDeleteQueryClause) MergeClause ¶
func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause)
MergeClause .
func (SoftDeleteQueryClause) ModifyStatement ¶
func (sd SoftDeleteQueryClause) ModifyStatement(stmt *gorm.Statement)
ModifyStatement .
type SoftDeleteUpdateClause ¶
SoftDeleteUpdateClause .
func (SoftDeleteUpdateClause) Build ¶
func (sd SoftDeleteUpdateClause) Build(clause.Builder)
Build .
func (SoftDeleteUpdateClause) MergeClause ¶
func (sd SoftDeleteUpdateClause) MergeClause(*clause.Clause)
MergeClause .
func (SoftDeleteUpdateClause) ModifyStatement ¶
func (sd SoftDeleteUpdateClause) ModifyStatement(stmt *gorm.Statement)
ModifyStatement .
type UUID ¶
type UUID sql.NullString
UUID auto generate an uuid on creating record.
func (UUID) CreateClauses ¶
CreateClauses .
type UUIDCreateClause ¶
UUIDCreateClause .
func (UUIDCreateClause) MergeClause ¶
func (cc UUIDCreateClause) MergeClause(*clause.Clause)
MergeClause .
func (UUIDCreateClause) ModifyStatement ¶
func (cc UUIDCreateClause) ModifyStatement(stmt *gorm.Statement)
ModifyStatement .