Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 87 for interfaces (0.21 sec)

  1. schema/schema.go

    	Relationships             Relationships
    	CreateClauses             []clause.Interface
    	QueryClauses              []clause.Interface
    	UpdateClauses             []clause.Interface
    	DeleteClauses             []clause.Interface
    	BeforeCreate, AfterCreate bool
    	BeforeUpdate, AfterUpdate bool
    	BeforeDelete, AfterDelete bool
    	BeforeSave, AfterSave     bool
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  2. clause/expression_test.go

    		Vars:         []interface{}{sql.Named("name", "jinzhu")},
    		Result:       "name1 = ? AND name2 = ?",
    		ExpectedVars: []interface{}{"jinzhu", "jinzhu"},
    	}, {
    		SQL:          "name1 = @name AND name2 = @@name",
    		Vars:         []interface{}{map[string]interface{}{"name": "jinzhu"}},
    		Result:       "name1 = ? AND name2 = @@name",
    		ExpectedVars: []interface{}{"jinzhu"},
    	}, {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Aug 10 05:34:33 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  3. association.go

    		Unscope:      true,
    	}
    }
    
    func (association *Association) Find(out interface{}, conds ...interface{}) error {
    	if association.Error == nil {
    		association.Error = association.buildCondition().Find(out, conds...).Error
    	}
    	return association.Error
    }
    
    func (association *Association) Append(values ...interface{}) error {
    	if association.Error == nil {
    		switch association.Relationship.Type {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  4. utils/utils_test.go

    }
    
    func TestToStringKey(t *testing.T) {
    	cases := []struct {
    		values []interface{}
    		key    string
    	}{
    		{[]interface{}{"a"}, "a"},
    		{[]interface{}{1, 2, 3}, "1_2_3"},
    		{[]interface{}{1, nil, 3}, "1_nil_3"},
    		{[]interface{}{[]interface{}{1, 2, 3}}, "[1 2 3]"},
    		{[]interface{}{[]interface{}{"1", "2", "3"}}, "[1 2 3]"},
    		{[]interface{}{[]interface{}{"1", nil, "3"}}, "[1 <nil> 3]"},
    	}
    	for _, c := range cases {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. schema/field.go

    		field.ValueOf = func(ctx context.Context, value reflect.Value) (interface{}, bool) {
    			fieldValue := reflect.Indirect(value).Field(fieldIndex)
    			return fieldValue.Interface(), fieldValue.IsZero()
    		}
    	default:
    		field.ValueOf = func(ctx context.Context, v reflect.Value) (interface{}, bool) {
    			v = reflect.Indirect(v)
    			for _, fieldIdx := range field.StructField.Index {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  6. clause/locking_test.go

    )
    
    func TestLocking(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Locking{Strength: clause.LockingStrengthUpdate}},
    			"SELECT * FROM `users` FOR UPDATE", nil,
    		},
    		{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  7. gorm.go

    	if db != nil {
    		for _, plugin := range c.Plugins {
    			if err := plugin.Initialize(db); err != nil {
    				return err
    			}
    		}
    	}
    	return nil
    }
    
    // Option gorm option interface
    type Option interface {
    	Apply(*Config) error
    	AfterInitialize(*DB) error
    }
    
    // DB GORM DB definition
    type DB struct {
    	*Config
    	Error        error
    	RowsAffected int64
    	Statement    *Statement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  8. clause/delete_test.go

    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestDelete(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Delete{}, clause.From{}},
    			"DELETE FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Delete{Modifier: "LOW_PRIORITY"}, clause.From{}},
    			"DELETE LOW_PRIORITY FROM `users`", nil,
    		},
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 01:18:01 GMT 2020
    - 608 bytes
    - Viewed (0)
  9. schema/constraint_test.go

    		for _, name := range []string{"Name", "Constraint"} {
    			if reflect.ValueOf(result).FieldByName(name).Interface() != reflect.ValueOf(v).FieldByName(name).Interface() {
    				t.Errorf(
    					"check %v %v should equal, expects %v, got %v",
    					k, name, reflect.ValueOf(result).FieldByName(name).Interface(), reflect.ValueOf(v).FieldByName(name).Interface(),
    				)
    			}
    		}
    	}
    }
    
    func TestParseUniqueConstraints(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  10. tests/query_test.go

    	}
    
    	DB.Create(&users)
    
    	var user User
    	DB.First(&user, map[string]interface{}{"name": users[0].Name})
    	CheckUser(t, user, users[0])
    
    	user = User{}
    	DB.Where(map[string]interface{}{"name": users[1].Name}).First(&user)
    	CheckUser(t, user, users[1])
    
    	var results []User
    	DB.Where(map[string]interface{}{"name": users[2].Name}).Find(&results)
    	if len(results) != 1 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top