Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for eq (0.25 sec)

  1. clause/expression_test.go

    	}{{
    		Expressions: []clause.Expression{
    			clause.Eq{Column: column, Value: "column-value"},
    		},
    		ExpectedVars: []interface{}{"column-value"},
    		Result:       "`column-name` = ?",
    	}, {
    		Expressions: []clause.Expression{
    			clause.Eq{Column: column, Value: nil},
    			clause.Eq{Column: column, Value: (*string)(nil)},
    			clause.Eq{Column: column, Value: (*int)(nil)},
    			clause.Eq{Column: column, Value: (*bool)(nil)},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Aug 10 05:34:33 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  2. clause/where_test.go

    			}},
    			"SELECT * FROM `users` WHERE `users`.`id` = ? OR `name` <> ? AND `age` > ?",
    			[]interface{}{"1", "jinzhu", 18},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  3. statement.go

    		case map[interface{}]interface{}:
    			for i, j := range v {
    				conds = append(conds, clause.Eq{Column: i, Value: j})
    			}
    		case map[string]string:
    			keys := make([]string, 0, len(v))
    			for i := range v {
    				keys = append(keys, i)
    			}
    			sort.Strings(keys)
    
    			for _, key := range keys {
    				conds = append(conds, clause.Eq{Column: key, Value: v[key]})
    			}
    		case map[string]interface{}:
    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)
  4. clause/from_test.go

    								[]clause.Expression{clause.Eq{clause.Column{Table: "profiles", Name: "email"}, clause.Column{Table: clause.CurrentTable, Name: "email"}}},
    							},
    						},
    					},
    				}, clause.From{
    					Joins: []clause.Join{
    						{
    							Type:  clause.InnerJoin,
    							Table: clause.Table{Name: "articles"},
    							ON: clause.Where{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 15 02:25:10 GMT 2020
    - 1.9K bytes
    - Viewed (0)
  5. association.go

    					primaryFields = append(primaryFields, ref.PrimaryKey)
    					foreignKeys = append(foreignKeys, ref.ForeignKey.DBName)
    					updateMap[ref.ForeignKey.DBName] = nil
    				} else if ref.PrimaryValue != "" {
    					tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    				}
    			}
    
    			if _, pvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, primaryFields); len(pvs) > 0 {
    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)
  6. clause/group_by_test.go

    				Columns: []clause.Column{{Name: "role"}},
    				Having:  []clause.Expression{clause.Eq{"role", "admin"}},
    			}},
    			"SELECT * FROM `users` GROUP BY `role` HAVING `role` = ?",
    			[]interface{}{"admin"},
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.GroupBy{
    				Columns: []clause.Column{{Name: "role"}},
    				Having:  []clause.Expression{clause.Eq{"role", "admin"}},
    			}, clause.GroupBy{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.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. cmd/postpolicyform.go

    				}
    				// {"acl": "public-read" } is an alternate way to indicate - [ "eq", "$acl", "public-read" ]
    				// In this case we will just collapse this into "eq" for all use cases.
    				parsedPolicy.Conditions.Policies = append(parsedPolicy.Conditions.Policies, struct {
    					Operator string
    					Key      string
    					Value    string
    				}{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  9. callbacks/update.go

    		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}}})
    				}
    			}
    		}
    	}
    
    	switch value := updatingValue.Interface().(type) {
    	case map[string]interface{}:
    		set = make([]clause.Assignment, 0, len(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)
  10. callbacks/preload.go

    				joinForeignFields = append(joinForeignFields, ref.ForeignKey)
    				foreignFields = append(foreignFields, ref.PrimaryKey)
    			} else if ref.PrimaryValue != "" {
    				tx = tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    			} else {
    				joinRelForeignFields = append(joinRelForeignFields, ref.ForeignKey)
    				relForeignKeys = append(relForeignKeys, ref.PrimaryKey.DBName)
    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)
Back to top