Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AddClauseIfNotExists (0.07 sec)

  1. statement.go

    	} else {
    		name := v.Name()
    		c := stmt.Clauses[name]
    		c.Name = name
    		v.MergeClause(&c)
    		stmt.Clauses[name] = c
    	}
    }
    
    // AddClauseIfNotExists add clause if not exists
    func (stmt *Statement) AddClauseIfNotExists(v clause.Interface) {
    	if c, ok := stmt.Clauses[v.Name()]; !ok || c.Expression == nil {
    		stmt.AddClause(v)
    	}
    }
    
    // BuildCondition build condition
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  2. finisher_api.go

    				column = f.DBName
    			}
    		}
    	}
    
    	if len(tx.Statement.Selects) != 1 {
    		fields := strings.FieldsFunc(column, utils.IsValidDBNameChar)
    		tx.Statement.AddClauseIfNotExists(clause.Select{
    			Distinct: tx.Statement.Distinct,
    			Columns:  []clause.Column{{Name: column, Raw: len(fields) != 1}},
    		})
    	}
    	tx.Statement.Dest = dest
    	return tx.callbacks.Query().Execute(tx)
    }
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 22.9K bytes
    - Viewed (0)
Back to top