Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for Godel (0.17 sec)

  1. schema/model_test.go

    package schema_test
    
    import (
    	"database/sql"
    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/utils/tests"
    )
    
    type User struct {
    	*gorm.Model
    	Name      *string
    	Age       *uint
    	Birthday  *time.Time
    	Account   *tests.Account
    	Pets      []*tests.Pet
    	Toys      []*tests.Toy `gorm:"polymorphic:Owner"`
    	CompanyID *int
    	Company   *tests.Company
    	ManagerID *uint
    	Manager   *User
    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)
  2. tests/associations_many2many_test.go

    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Languages").Find(&user2.Languages)
    
    	CheckUser(t, user2, user)
    
    	// Count
    	AssertAssociationCount(t, user, "Languages", 2, "")
    
    	// Append
    	language := Language{Code: "language-many2many-append", Name: "language-many2many-append"}
    	DB.Create(&language)
    
    	if err := DB.Model(&user2).Association("Languages").Append(&language); err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
  3. tests/associations_test.go

    	var emptyUser User
    	var err error
    	// belongs to
    	err = DB.Model(&emptyUser).Association("Company").Delete(&user1.Company)
    	AssertEqual(t, err, gorm.ErrPrimaryKeyRequired)
    	// has many
    	err = DB.Model(&emptyUser).Association("Pets").Delete(&user1.Pets)
    	AssertEqual(t, err, gorm.ErrPrimaryKeyRequired)
    	// has one
    	err = DB.Model(&emptyUser).Association("Account").Delete(&user1.Account)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  4. association.go

    					association.Error = associationDB.Model(nil).Where(clause.IN{Column: column, Values: values}).Delete(reflect.New(rel.FieldSchema.ModelType).Interface()).Error
    				}
    			}
    		case schema.HasOne, schema.HasMany:
    			model := reflect.New(rel.FieldSchema.ModelType).Interface()
    			tx := association.DB.Model(model)
    
    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)
  5. tests/sql_builder_test.go

    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	stmt := dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageInt(8)}).Statement
    	sql := DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=8,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    
    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)
  6. istioctl/pkg/writer/envoy/configdump/cluster.go

    	"istio.io/istio/istioctl/pkg/util/proto"
    	"istio.io/istio/pilot/pkg/model"
    	v3 "istio.io/istio/pilot/pkg/xds/v3"
    	"istio.io/istio/pkg/config/host"
    )
    
    // ClusterFilter is used to pass filter information into cluster based config writer print functions
    type ClusterFilter struct {
    	FQDN      host.Name
    	Port      int
    	Subset    string
    	Direction model.TrafficDirection
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu May 11 05:38:17 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  7. cmd/object-handlers-common.go

    }
    
    func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toDel []ObjectToDelete, lcEvent lifecycle.Event) {
    	for remaining := toDel; len(remaining) > 0; toDel = remaining {
    		if len(toDel) > maxDeleteList {
    			remaining = toDel[maxDeleteList:]
    			toDel = toDel[:maxDeleteList]
    		} else {
    			remaining = nil
    		}
    		vc, _ := globalBucketVersioningSys.Get(bucket)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 09 08:17:49 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  8. tests/query_test.go

    	var simpleUser2 SimpleUser
    	if err := DB.Model(&User{}).Select("id").First(&simpleUser2, user.ID).Error; err != nil {
    		t.Fatalf("Failed to query smaller user, got error %v", err)
    	}
    
    	AssertObjEqual(t, user, simpleUser2, "ID")
    
    	var simpleUsers []SimpleUser
    	if err := DB.Model(&User{}).Select("id").Find(&simpleUsers, user.ID).Error; err != nil || len(simpleUsers) != 1 {
    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)
  9. istioctl/pkg/writer/pilot/status_test.go

    	discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
    	status "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
    	"google.golang.org/protobuf/types/known/anypb"
    
    	"istio.io/istio/pilot/pkg/model"
    	"istio.io/istio/pilot/pkg/util/protoconv"
    	"istio.io/istio/pilot/pkg/xds"
    	v3 "istio.io/istio/pilot/pkg/xds/v3"
    	"istio.io/istio/pkg/cluster"
    	"istio.io/istio/pkg/test/util/assert"
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  10. gorm.go

    }
    
    // SetupJoinTable setup join table schema
    func (db *DB) SetupJoinTable(model interface{}, field string, joinTable interface{}) error {
    	var (
    		tx                      = db.getInstance()
    		stmt                    = tx.Statement
    		modelSchema, joinSchema *schema.Schema
    	)
    
    	err := stmt.Parse(model)
    	if err != nil {
    		return err
    	}
    	modelSchema = stmt.Schema
    
    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)
Back to top