Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for conds (0.16 sec)

  1. finisher_api.go

    // First finds the first record ordered by primary key, matching given conditions conds
    func (db *DB) First(dest interface{}, conds ...interface{}) (tx *DB) {
    	tx = db.Limit(1).Order(clause.OrderByColumn{
    		Column: clause.Column{Table: clause.CurrentTable, Name: clause.PrimaryKey},
    	})
    	if len(conds) > 0 {
    		if exprs := tx.Statement.BuildCondition(conds[0], conds[1:]...); len(exprs) > 0 {
    			tx.Statement.AddClause(clause.Where{Exprs: exprs})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  2. statement.go

    						if len(values) > 0 {
    							conds = append(conds, clause.IN{Column: clause.PrimaryColumn, Values: values})
    							return []clause.Expression{clause.And(conds...)}
    						}
    						return nil
    					}
    				}
    
    				conds = append(conds, clause.IN{Column: clause.PrimaryColumn, Values: args})
    			}
    		}
    	}
    
    	if len(conds) > 0 {
    		return []clause.Expression{clause.And(conds...)}
    	}
    	return nil
    }
    
    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)
  3. chainable_api.go

    func (db *DB) Clauses(conds ...clause.Expression) (tx *DB) {
    	tx = db.getInstance()
    	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 {
    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)
  4. association.go

    				conds = append(conds, clause.IN{Column: pcolumn, Values: pvalues})
    			} else {
    				return ErrPrimaryKeyRequired
    			}
    
    			_, rvs := schema.GetIdentityFieldValuesMapFromValues(association.DB.Statement.Context, values, primaryFields)
    			relColumn, relValues := schema.ToQueryValues(rel.Schema.Table, foreignKeys, rvs)
    			conds = append(conds, clause.IN{Column: relColumn, Values: relValues})
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  5. callbacks/query.go

    			var conds []clause.Expression
    			for _, primaryField := range db.Statement.Schema.PrimaryFields {
    				if v, isZero := primaryField.ValueOf(db.Statement.Context, db.Statement.ReflectValue); !isZero {
    					conds = append(conds, clause.Eq{Column: clause.Column{Table: db.Statement.Table, Name: primaryField.DBName}, Value: v})
    				}
    			}
    
    			if len(conds) > 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/envoy/configdump/listener.go

    }
    
    func describeMatch(match *route.RouteMatch) string {
    	conds := []string{}
    	if match.GetPrefix() != "" {
    		conds = append(conds, fmt.Sprintf("%s*", match.GetPrefix()))
    	}
    	if match.GetPathSeparatedPrefix() != "" {
    		conds = append(conds, fmt.Sprintf("PathPrefix:%s", match.GetPathSeparatedPrefix()))
    	}
    	if match.GetPath() != "" {
    		conds = append(conds, match.GetPath())
    	}
    	if match.GetSafeRegex() != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  7. schema/relationship.go

    				relForeignKeys = append(relForeignKeys, ref.ForeignKey.DBName)
    			} else if ref.PrimaryValue != "" {
    				conds = append(conds, clause.Eq{
    					Column: clause.Column{Table: rel.JoinTable.Table, Name: ref.ForeignKey.DBName},
    					Value:  ref.PrimaryValue,
    				})
    			} else {
    				conds = append(conds, clause.Eq{
    					Column: clause.Column{Table: rel.JoinTable.Table, Name: ref.ForeignKey.DBName},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  8. callbacks/preload.go

    	column, values := schema.ToQueryValues(clause.CurrentTable, relForeignKeys, foreignValues)
    
    	if len(values) != 0 {
    		for _, cond := range conds {
    			if fc, ok := cond.(func(*gorm.DB) *gorm.DB); ok {
    				tx = fc(tx)
    			} else {
    				inlineConds = append(inlineConds, cond)
    			}
    		}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  9. tests/joins_test.go

    		return users[i].ID > users[j].ID
    	})
    
    	for idx, user := range users {
    		CheckUser(t, user, users2[idx])
    	}
    }
    
    func TestJoinConds(t *testing.T) {
    	user := *GetUser("joins-conds", Config{Account: true, Pets: 3})
    	DB.Save(&user)
    
    	var users1 []User
    	DB.Joins("inner join pets on pets.user_id = users.id").Where("users.name = ?", user.Name).Find(&users1)
    	if len(users1) != 3 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  10. tensorflow/c/eager/tape.h

        } else {
          // TODO(allenl): Figure out why using zeros_like everywhere causes issues
          // for some gradient functions and if there's another way to work around
          // it (e.g. conds instead of ifs). The value shouldn't really matter.
          TF_RETURN_IF_ERROR(vspace_.BuildOnesLike(output_tensor, &aid));
        }
        if (TF_PREDICT_FALSE(aid == nullptr)) {
          return tensorflow::errors::Internal(
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Apr 02 12:40:29 GMT 2024
    - 47.2K bytes
    - Viewed (1)
Back to top