Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for Model (0.17 sec)

  1. tests/table_test.go

    		}
    	}
    
    	r = dryDB.Table("(?) as u", DB.Model(&User{}).Select("name")).Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE .users.\\..deleted_at. IS NULL\\) as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. 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 May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  3. 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 May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  4. tests/migrate_test.go

    	}
    }
    
    func TestMigrateTable(t *testing.T) {
    	type TableStruct struct {
    		gorm.Model
    		Name string
    	}
    
    	DB.Migrator().DropTable(&TableStruct{})
    	DB.AutoMigrate(&TableStruct{})
    
    	if !DB.Migrator().HasTable(&TableStruct{}) {
    		t.Fatalf("should found created table")
    	}
    
    	type NewTableStruct struct {
    		gorm.Model
    		Name string
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  5. callbacks.go

    		optimizer.ModifyStatement(stmt)
    	}
    
    	// assign model values
    	if stmt.Model == nil {
    		stmt.Model = stmt.Dest
    	} else if stmt.Dest == nil {
    		stmt.Dest = stmt.Model
    	}
    
    	// parse model values
    	if stmt.Model != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  6. istioctl/pkg/version/version.go

    	"istio.io/istio/istioctl/pkg/cli"
    	"istio.io/istio/istioctl/pkg/clioptions"
    	"istio.io/istio/istioctl/pkg/multixds"
    	"istio.io/istio/operator/cmd/mesh"
    	"istio.io/istio/pilot/pkg/model"
    	"istio.io/istio/pilot/pkg/xds"
    	"istio.io/istio/pkg/proxy"
    	istioVersion "istio.io/istio/pkg/version"
    )
    
    func NewVersionCommand(ctx cli.Context) *cobra.Command {
    	profileCmd := mesh.ProfileCmd(ctx)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  7. tests/create_test.go

    				t.Fatalf("errors happened when query: %v", err)
    			} else {
    				CheckUser(t, newUser, user)
    			}
    		}
    	}
    }
    
    func TestCreateFromMap(t *testing.T) {
    	if err := DB.Model(&User{}).Create(map[string]interface{}{"Name": "create_from_map", "Age": 18}).Error; err != nil {
    		t.Fatalf("failed to create data from map, got error: %v", err)
    	}
    
    	var result User
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/pilot/status.go

    	discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
    	xdsstatus "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
    
    	"istio.io/istio/istioctl/pkg/multixds"
    	"istio.io/istio/pilot/pkg/model"
    	xdsresource "istio.io/istio/pilot/pkg/xds/v3"
    	"istio.io/istio/pkg/log"
    )
    
    // XdsStatusWriter enables printing of sync status using multiple xdsapi.DiscoveryResponse Istiod responses
    type XdsStatusWriter struct {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 15 04:16:55 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. cmd/update.go

    			coreMap[cpus[i].CoreID] = struct{}{}
    		}
    		cpu := cpus[0]
    		uaAppend(" CPU ", fmt.Sprintf("(total_cpus:%d, total_cores:%d; vendor:%s; family:%s; model:%s; stepping:%d; model_name:%s)",
    			len(cpuMap), len(coreMap), cpu.VendorID, cpu.Family, cpu.Model, cpu.Stepping, cpu.ModelName))
    	}
    	uaAppend(")", "")
    
    	return strings.Join(userAgentParts, "")
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  10. istioctl/pkg/workload/workload.go

    	return meshConfig.DefaultConfig, os.WriteFile(filepath.Join(dir, "mesh.yaml"), proxyYAML, filePerms)
    }
    
    func marshalWorkloadEntryPodPorts(p map[string]uint32) string {
    	var out []model.PodPort
    	for name, port := range p {
    		out = append(out, model.PodPort{Name: name, ContainerPort: int(port)})
    	}
    	if len(out) == 0 {
    		return ""
    	}
    	sort.Slice(out, func(i, j int) bool {
    		return out[i].Name < out[j].Name
    	})
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Apr 17 20:06:41 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top