Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for Clauss (0.24 sec)

  1. clause/locking_test.go

    			"SELECT * FROM `users` FOR SHARE OF `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Locking{Strength: clause.LockingStrengthUpdate, Options: clause.LockingOptionsNoWait}},
    			"SELECT * FROM `users` FOR UPDATE NOWAIT", nil,
    		},
    		{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  2. 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)
  3. tests/sql_builder_test.go

    	newDB := DB.Session(&gorm.Session{NewDB: true, DryRun: true}).Table("users")
    
    	newDB.Clauses(
    		clause.From{
    			Tables: []clause.Table{{Name: "users"}},
    			Joins: []clause.Join{
    				{
    					Table: clause.Table{Name: "companies", Raw: false},
    					ON: clause.Where{
    						Exprs: []clause.Expression{
    							clause.Eq{
    								Column: clause.Column{
    									Table: "users",
    									Name:  "company_id",
    								},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  4. tests/query_test.go

    	type P struct{}
    	var p1 P
    	err := DB.Take(&p1, 1).Error
    	AssertEqual(t, err, gorm.ErrModelAccessibleFieldsRequired)
    
    	var p2 interface{}
    
    	err = DB.Table("ps").Clauses(clause.Eq{Column: clause.Column{
    		Table: clause.CurrentTable, Name: clause.PrimaryKey,
    	}, Value: 1}).Scan(&p2).Error
    	AssertEqual(t, err, gorm.ErrModelValueRequired)
    }
    
    func TestQueryScanToArray(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  5. internal/s3select/sql/parser.go

    // Expression represents a logical disjunction of clauses
    type Expression struct {
    	And []*AndCondition `parser:"@@ ( \"OR\" @@ )*"`
    }
    
    // ListExpr represents a literal list with elements as expressions.
    type ListExpr struct {
    	Elements []*Expression `parser:"\"(\" @@ ( \",\" @@ )* \")\" | \"[\" @@ ( \",\" @@ )* \"]\""`
    }
    
    // AndCondition represents logical conjunction of clauses
    type AndCondition struct {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  6. 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)
  7. schema/relationship.go

    			} 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},
    					Value:  clause.Column{Table: rel.FieldSchema.Table, Name: ref.PrimaryKey.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. internal/config/errors.go

    	ErrStorageClassValue = newErrFn(
    		"Invalid storage class value",
    		"Please check the value",
    		`MINIO_STORAGE_CLASS_STANDARD: Format "EC:<Default_Parity_Standard_Class>" (e.g. "EC:3"). This sets the number of parity drives for MinIO server in Standard mode. Objects are stored in Standard mode, if storage class is not defined in Put request
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 18 22:25:32 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top