Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ModifyStatement (0.2 sec)

  1. soft_delete.go

    }
    
    func (sd SoftDeleteUpdateClause) MergeClause(*clause.Clause) {
    }
    
    func (sd SoftDeleteUpdateClause) ModifyStatement(stmt *Statement) {
    	if stmt.SQL.Len() == 0 && !stmt.Statement.Unscoped {
    		SoftDeleteQueryClause(sd).ModifyStatement(stmt)
    	}
    }
    
    func (DeletedAt) DeleteClauses(f *schema.Field) []clause.Interface {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  2. callbacks.go

    		resetBuildClauses bool
    	)
    
    	if len(stmt.BuildClauses) == 0 {
    		stmt.BuildClauses = p.Clauses
    		resetBuildClauses = true
    	}
    
    	if optimizer, ok := db.Statement.Dest.(StatementModifier); ok {
    		optimizer.ModifyStatement(stmt)
    	}
    
    	// assign model values
    	if stmt.Model == nil {
    		stmt.Model = stmt.Dest
    	} else if stmt.Dest == nil {
    		stmt.Dest = stmt.Model
    	}
    
    	// parse model values
    	if stmt.Model != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  3. statement.go

    	Conds    []interface{}
    	On       *clause.Where
    	Selects  []string
    	Omits    []string
    	JoinType clause.JoinType
    }
    
    // StatementModifier statement modifier interface
    type StatementModifier interface {
    	ModifyStatement(*Statement)
    }
    
    // WriteString write string
    func (stmt *Statement) WriteString(str string) (int, error) {
    	return stmt.SQL.WriteString(str)
    }
    
    // WriteByte write byte
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  4. tests/associations_test.go

    	return "empty"
    }
    
    func (sd emptyQueryClause) Build(clause.Builder) {
    }
    
    func (sd emptyQueryClause) MergeClause(*clause.Clause) {
    }
    
    func (sd emptyQueryClause) ModifyStatement(stmt *gorm.Statement) {
    	// do nothing
    }
    
    func TestAssociationEmptyQueryClause(t *testing.T) {
    	type Organization struct {
    		gorm.Model
    		Name string
    	}
    	type Region struct {
    		gorm.Model
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. chainable_api.go

    	var whereConds []interface{}
    
    	for _, cond := range conds {
    		if c, ok := cond.(clause.Interface); ok {
    			tx.Statement.AddClause(c)
    		} else if optimizer, ok := cond.(StatementModifier); ok {
    			optimizer.ModifyStatement(tx.Statement)
    		} else {
    			whereConds = append(whereConds, cond)
    		}
    	}
    
    	if len(whereConds) > 0 {
    		tx.Statement.AddClause(clause.Where{Exprs: tx.Statement.BuildCondition(whereConds[0], whereConds[1:]...)})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
Back to top