Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Turing (0.15 sec)

  1. schema/relationship_test.go

    func TestMany2ManyWithMultiPrimaryKeys(t *testing.T) {
    	type Tag struct {
    		ID     uint   `gorm:"primary_key"`
    		Locale string `gorm:"primary_key"`
    		Value  string
    	}
    
    	type Blog struct {
    		ID         uint   `gorm:"primary_key"`
    		Locale     string `gorm:"primary_key"`
    		Subject    string
    		Body       string
    		Tags       []Tag `gorm:"many2many:blog_tags;"`
    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)
  2. scan.go

    	switch dest := db.Statement.Dest.(type) {
    	case map[string]interface{}, *map[string]interface{}:
    		if initialized || rows.Next() {
    			columnTypes, _ := rows.ColumnTypes()
    			prepareValues(values, db, columnTypes, columns)
    
    			db.RowsAffected++
    			db.AddError(rows.Scan(values...))
    
    			mapValue, ok := dest.(map[string]interface{})
    			if !ok {
    				if v, ok := dest.(*map[string]interface{}); ok {
    					if *v == nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  3. utils/utils.go

    // NestedRelationName nested relationships like `Manager__Company`
    func NestedRelationName(prefix, name string) string {
    	return prefix + nestedRelationSplit + name
    }
    
    // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}`
    func SplitNestedRelationName(name string) []string {
    	return strings.Split(name, nestedRelationSplit)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. migrator/migrator.go

    		*gorm.Statement
    		Depends []*schema.Schema
    	}
    
    	var (
    		modelNames, orderedModelNames []string
    		orderedModelNamesMap          = map[string]bool{}
    		parsedSchemas                 = map[*schema.Schema]bool{}
    		valuesMap                     = map[string]Dependency{}
    		insertIntoOrderedList         func(name string)
    		parseDependence               func(value interface{}, addToList bool)
    	)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  5. chainable_api.go

    //
    // Use Select when you only want a subset of the fields. By default, GORM will select all fields.
    // Select accepts both string arguments and arrays.
    //
    //	// Select name and age of user using multiple arguments
    //	db.Select("name", "age").Find(&users)
    //	// Select name and age of user using an array
    //	db.Select([]string{"name", "age"}).Find(&users)
    func (db *DB) Select(query interface{}, args ...interface{}) (tx *DB) {
    	tx = db.getInstance()
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  6. clause/where_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestWhere(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Where{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  7. callbacks/preload.go

    //		"k4": {
    //			"k5.k6": {"arg4"},
    //		},
    //	}
    func parsePreloadMap(s *schema.Schema, preloads map[string][]interface{}) map[string]map[string][]interface{} {
    	preloadMap := map[string]map[string][]interface{}{}
    	setPreloadMap := func(name, value string, args []interface{}) {
    		if _, ok := preloadMap[name]; !ok {
    			preloadMap[name] = map[string][]interface{}{}
    		}
    		if value != "" {
    			preloadMap[name][value] = args
    		}
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  8. tests/preload_test.go

    	type (
    		Preload struct {
    			ID       uint
    			Value    string
    			NestedID uint
    		}
    		Join struct {
    			ID       uint
    			Value    string
    			NestedID uint
    		}
    		Nested struct {
    			ID       uint
    			Preloads []*Preload
    			Join     Join
    			ValueID  uint
    		}
    		Value struct {
    			ID     uint
    			Name   string
    			Nested Nested
    		}
    	)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  9. tests/query_test.go

    		t.Fatalf("Build NOT condition, but got %v", result.Statement.SQL.String())
    	}
    
    	result = dryDB.Not(map[string]interface{}{"name": []string{}}).Find(&User{})
    	if !regexp.MustCompile("SELECT \\* FROM .*users.* WHERE .*name.* IS NOT NULL").MatchString(result.Statement.SQL.String()) {
    		t.Fatalf("Build NOT condition, but got %v", result.Statement.SQL.String())
    	}
    
    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)
  10. schema/field.go

    	Float  DataType = "float"
    	String DataType = "string"
    	Time   DataType = "time"
    	Bytes  DataType = "bytes"
    )
    
    const DefaultAutoIncrementIncrement int64 = 1
    
    // Field is the representation of model schema's field
    type Field struct {
    	Name                   string
    	DBName                 string
    	BindNames              []string
    	EmbeddedBindNames      []string
    	DataType               DataType
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
Back to top