Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ModifyStatement (0.17 sec)

  1. callbacks.go

    		resetBuildClauses bool
    	)
    
    	if len(stmt.BuildClauses) == 0 {
    		stmt.BuildClauses = p.Clauses
    		resetBuildClauses = true
    	}
    
    	if optimizer, ok := stmt.Dest.(StatementModifier); ok {
    		optimizer.ModifyStatement(stmt)
    	}
    
    	if db.DefaultContextTimeout > 0 {
    		if _, ok := stmt.Context.Deadline(); !ok {
    			stmt.Context, _ = context.WithTimeout(stmt.Context, db.DefaultContextTimeout)
    		}
    	}
    
    	// assign model values
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  2. statement.go

    	Selects    []string
    	Omits      []string
    	Expression clause.Expression
    	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
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  3. 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:]...)})
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 14.8K bytes
    - Viewed (0)
  4. generics.go

    	"database/sql"
    	"fmt"
    	"sort"
    	"strings"
    
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/logger"
    )
    
    type result struct {
    	Result       sql.Result
    	RowsAffected int64
    }
    
    func (info *result) ModifyStatement(stmt *Statement) {
    	stmt.Result = info
    }
    
    // Build implements clause.Expression interface
    func (result) Build(clause.Builder) {
    }
    
    func WithResult() *result {
    	return &result{}
    }
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 15.5K bytes
    - Viewed (0)
Back to top