Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 5,368 for Clauss (0.28 sec)

  1. callbacks/create.go

    				if _, ok := db.Statement.Clauses["RETURNING"]; !ok {
    					fromColumns := make([]clause.Column, 0, len(db.Statement.Schema.FieldsWithDefaultDBValue))
    					for _, field := range db.Statement.Schema.FieldsWithDefaultDBValue {
    						fromColumns = append(fromColumns, clause.Column{Name: field.DBName})
    					}
    					db.Statement.AddClause(clause.Returning{Columns: fromColumns})
    				}
    			}
    		}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  2. statement_test.go

    			s1.AddClause(clause.Where{
    				Exprs: s.BuildCondition("FINAL1"),
    			})
    			s2 := s.clone()
    			s2.AddClause(clause.Where{
    				Exprs: s.BuildCondition("FINAL2"),
    			})
    
    			if reflect.DeepEqual(s1.Clauses["WHERE"], s2.Clauses["WHERE"]) {
    				t.Errorf("Where conditions should be different")
    			}
    		})
    	}
    }
    
    func TestNilCondition(t *testing.T) {
    	s := new(Statement)
    	if len(s.BuildCondition(nil)) != 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Dec 23 13:19:41 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  3. clause/locking.go

    		builder.WriteQuoted(locking.Table)
    	}
    
    	if locking.Options != "" {
    		builder.WriteByte(' ')
    		builder.WriteString(locking.Options)
    	}
    }
    
    // MergeClause merge order by clauses
    func (locking Locking) MergeClause(clause *Clause) {
    	clause.Expression = locking
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 773 bytes
    - Viewed (0)
  4. callbacks/update.go

    					stmt.AddClause(clause.Where{Exprs: []clause.Expression{clause.IN{Column: column, Values: values}}})
    				}
    			}
    		case reflect.Struct:
    			for _, field := range stmt.Schema.PrimaryFields {
    				if value, isZero := field.ValueOf(stmt.Context, stmt.ReflectValue); !isZero {
    					stmt.AddClause(clause.Where{Exprs: []clause.Expression{clause.Eq{Column: field.DBName, Value: value}}})
    				}
    			}
    		}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  5. gorm.go

    				Context:   db.Statement.Context,
    				Clauses:   map[string]clause.Clause{},
    				Vars:      make([]interface{}, 0, 8),
    				SkipHooks: db.Statement.SkipHooks,
    			}
    		} else {
    			// with clone statement
    			tx.Statement = db.Statement.clone()
    			tx.Statement.DB = tx
    		}
    
    		return tx
    	}
    
    	return db
    }
    
    // Expr returns clause.Expr, which can be used to pass SQL expression as params
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  6. clause/where.go

    		} else {
    			expr.Build(builder)
    		}
    	}
    }
    
    // MergeClause merge where clauses
    func (where Where) MergeClause(clause *Clause) {
    	if w, ok := clause.Expression.(Where); ok {
    		exprs := make([]Expression, len(w.Exprs)+len(where.Exprs))
    		copy(exprs, w.Exprs)
    		copy(exprs[len(w.Exprs):], where.Exprs)
    		where.Exprs = exprs
    	}
    
    	clause.Expression = where
    }
    
    func And(exprs ...Expression) Expression {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  7. migrator/migrator.go

    				createTableSQL += "CONSTRAINT ? UNIQUE (?),"
    				values = append(values, clause.Column{Name: uni.Name}, clause.Expr{SQL: stmt.Quote(uni.Field.DBName)})
    			}
    
    			for _, chk := range stmt.Schema.ParseCheckConstraints() {
    				createTableSQL += "CONSTRAINT ? CHECK (?),"
    				values = append(values, clause.Column{Name: chk.Name}, clause.Expr{SQL: chk.Constraint})
    			}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  8. tests/delete_test.go

    		GetUser("delete-returning-2", Config{}),
    		GetUser("delete-returning-3", Config{}),
    	}
    	DB.Create(&users)
    
    	var results []User
    	DB.Where("name IN ?", []string{users[0].Name, users[1].Name}).Clauses(clause.Returning{}).Delete(&results)
    	if len(results) != 2 {
    		t.Errorf("failed to return delete data, got %v", results)
    	}
    
    	var count int64
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     *
     * This class may be used to stream very large responses. For example, it is possible to use this
     * class to read a response that is larger than the entire memory allocated to the current process.
     * It can even stream a response larger than the total storage on the current device, which is a
     * common requirement for video streaming applications.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. tests/update_test.go

    		t.Errorf("Not error should happen when updating with gorm expr, but got %v", err)
    	}
    
    	if err := DB.Model(&results[1]).Clauses(clause.Returning{Columns: []clause.Column{{Name: "age"}}}).Updates(map[string]interface{}{"age": gorm.Expr("age + ?", 100)}).Error; err != nil {
    		t.Errorf("Not error should happen when updating with gorm expr, but got %v", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
Back to top