Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 81 for Model (0.2 sec)

  1. errors.go

    	// ErrPrimaryKeyRequired primary keys required
    	ErrPrimaryKeyRequired = errors.New("primary key required")
    	// ErrModelValueRequired model value required
    	ErrModelValueRequired = errors.New("model value required")
    	// ErrModelAccessibleFieldsRequired model accessible fields required
    	ErrModelAccessibleFieldsRequired = errors.New("model accessible fields required")
    	// ErrSubQueryRequired sub query required
    	ErrSubQueryRequired = errors.New("sub query required")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  2. callbacks/delete.go

    				}
    
    				if db.Statement.ReflectValue.CanAddr() && db.Statement.Dest != db.Statement.Model && db.Statement.Model != nil {
    					_, queryValues = schema.GetIdentityFieldValuesMap(db.Statement.Context, reflect.ValueOf(db.Statement.Model), db.Statement.Schema.PrimaryFields)
    					column, values = schema.ToQueryValues(db.Statement.Table, db.Statement.Schema.PrimaryFieldDBNames, queryValues)
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Feb 25 02:48:23 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  3. istioctl/pkg/admin/istiodconfig_test.go

    			}
    		})
    	}
    }
    
    func resourceHandler(writer http.ResponseWriter, request *http.Request) {
    	const getResponse = `{"name":"resource","description":"Core resource model scope","output_level":"info","stack_trace_level":"none","log_callers":false}`
    
    	switch request.Method {
    	case http.MethodGet:
    		_, _ = writer.Write([]byte(getResponse))
    	}
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  4. tests/main_test.go

    		t.Errorf("Should got error with invalid SQL")
    	}
    
    	if DB.Model(&User{}).Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil {
    		t.Errorf("Should got error with invalid SQL")
    	}
    
    	if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Find(&User{}).Error == nil {
    		t.Errorf("Should got error with invalid SQL")
    	}
    
    	var count1, count2 int64
    	DB.Model(&User{}).Count(&count1)
    	if count1 <= 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 24 01:31:58 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  5. istioctl/pkg/describe/describe.go

    	"istio.io/istio/istioctl/pkg/util/handlers"
    	istio_envoy_configdump "istio.io/istio/istioctl/pkg/writer/envoy/configdump"
    	"istio.io/istio/pilot/pkg/config/kube/crdclient"
    	"istio.io/istio/pilot/pkg/model"
    	"istio.io/istio/pilot/pkg/networking/util"
    	"istio.io/istio/pilot/pkg/security/authn"
    	pilotcontroller "istio.io/istio/pilot/pkg/serviceregistry/kube/controller"
    	v3 "istio.io/istio/pilot/pkg/xds/v3"
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  6. cmd/veeam-sos-api.go

    package cmd
    
    import (
    	"bytes"
    	"context"
    	"encoding/xml"
    	"io"
    
    	"github.com/minio/madmin-go/v3"
    )
    
    // From Veeam-SOSAPI_1.0_Document_v1.02d.pdf
    // - SOSAPI Protocol Version
    // - Model Name of the vendor plus version for statistical analysis.
    // - List of Smart Object Storage protocol capabilities supported by the server.
    // Currently, there are three capabilities supported:
    //   - Capacity Reporting
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jan 30 18:43:58 GMT 2024
    - 8.2K bytes
    - Viewed (2)
  7. tests/associations_has_many_test.go

    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Pets").Find(&user2.Pets)
    	CheckUser(t, user2, user)
    
    	var pets []Pet
    	DB.Model(&user).Where("name = ?", user.Pets[0].Name).Association("Pets").Find(&pets)
    
    	if len(pets) != 1 {
    		t.Fatalf("should only find one pets, but got %v", len(pets))
    	}
    
    	CheckPet(t, pets[0], *user.Pets[0])
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  8. schema/relationship_test.go

    	} else {
    		for _, rel := range relations {
    			checkSchemaRelation(t, s, rel)
    		}
    	}
    }
    
    func TestBelongsToOverrideForeignKey(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    		Name string
    	}
    
    	type User struct {
    		gorm.Model
    		Profile      Profile `gorm:"ForeignKey:ProfileRefer"`
    		ProfileRefer int
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  9. schema/schema.go

    			case "func(*gorm.DB) error": // TODO hack
    				reflect.Indirect(reflect.ValueOf(schema)).FieldByName(string(cbName)).SetBool(true)
    			default:
    				logger.Default.Warn(context.Background(), "Model %v don't match %vInterface, should be `%v(*gorm.DB) error`. Please see https://gorm.io/docs/hooks.html", schema, cbName, cbName)
    			}
    		}
    	}
    
    	// Cache the schema
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  10. tests/preload_test.go

    	}
    	wg.Wait()
    }
    
    func TestPreloadWithDiffModel(t *testing.T) {
    	user := *GetUser("preload_with_diff_model", Config{Account: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	var result struct {
    		Something string
    		User
    	}
    
    	DB.Model(User{}).Preload("Account", clause.Eq{Column: "number", Value: user.Account.Number}).Select(
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
Back to top