Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 71 for Cool (0.23 sec)

  1. schema/index.go

    					idx.Comment = index.Comment
    				}
    				if idx.Option == "" {
    					idx.Option = index.Option
    				}
    
    				idx.Fields = append(idx.Fields, index.Fields...)
    				sort.Slice(idx.Fields, func(i, j int) bool {
    					return idx.Fields[i].priority < idx.Fields[j].priority
    				})
    
    				indexes[index.Name] = idx
    			}
    		}
    	}
    	for _, index := range indexes {
    		if index.Class == "UNIQUE" && len(index.Fields) == 1 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. tests/scanner_valuer_test.go

    	}
    
    	data := ScannerValuerStruct{
    		Name:     sql.NullString{String: "name", Valid: true},
    		Gender:   &sql.NullString{String: "M", Valid: true},
    		Age:      sql.NullInt64{Int64: 18, Valid: true},
    		Male:     sql.NullBool{Bool: true, Valid: true},
    		Height:   sql.NullFloat64{Float64: 1.8888, Valid: true},
    		Birthday: sql.NullTime{Time: time.Now(), Valid: true},
    		Allergen: NullString{sql.NullString{String: "Allergen", Valid: true}},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. schema/pool.go

    package schema
    
    import (
    	"reflect"
    	"sync"
    )
    
    // sync pools
    var (
    	normalPool      sync.Map
    	poolInitializer = func(reflectType reflect.Type) FieldNewValuePool {
    		v, _ := normalPool.LoadOrStore(reflectType, &sync.Pool{
    			New: func() interface{} {
    				return reflect.New(reflectType).Interface()
    			},
    		})
    		return v.(FieldNewValuePool)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 11 13:37:44 GMT 2022
    - 345 bytes
    - Viewed (0)
  4. interfaces.go

    type Plugin interface {
    	Name() string
    	Initialize(*DB) error
    }
    
    type ParamsFilter interface {
    	ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
    }
    
    // ConnPool db conns pool interface
    type ConnPool interface {
    	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
    	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  5. tests/preload_test.go

    			Manager: &User{
    				Name: "Alexis Manager",
    				Tools: []Tools{
    					{Name: "Alexis Tool 1"},
    					{Name: "Alexis Tool 2"},
    				},
    			},
    		},
    		{
    			Name: "TestMergeNestedPreloadWithNestedJoin-2",
    			Manager: &User{
    				Name: "Jinzhu Manager",
    				Tools: []Tools{
    					{Name: "Jinzhu Tool 1"},
    					{Name: "Jinzhu Tool 2"},
    				},
    			},
    		},
    	}
    
    	DB.Create(&users)
    
    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)
  6. statement.go

    // SelectAndOmitColumns get select and omit columns, select -> true, omit -> false
    func (stmt *Statement) SelectAndOmitColumns(requireCreate, requireUpdate bool) (map[string]bool, bool) {
    	results := map[string]bool{}
    	notRestricted := false
    
    	processColumn := func(column string, result bool) {
    		if stmt.Schema == nil {
    			results[column] = result
    		} else if column == "*" {
    			notRestricted = result
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  7. callbacks/helper.go

    			if len(values.Values[i]) == 0 {
    				values.Values[i] = make([]interface{}, len(columns))
    			}
    
    			values.Values[i][idx] = v
    		}
    	}
    	return
    }
    
    func hasReturning(tx *gorm.DB, supportReturning bool) (bool, gorm.ScanMode) {
    	if supportReturning {
    		if c, ok := tx.Statement.Clauses["RETURNING"]; ok {
    			returning, _ := c.Expression.(clause.Returning)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 14 12:32:57 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  8. schema/model_test.go

    	Team      []*User           `gorm:"foreignkey:ManagerID"`
    	Languages []*tests.Language `gorm:"many2many:UserSpeak"`
    	Friends   []*User           `gorm:"many2many:user_friends"`
    	Active    *bool
    }
    
    type (
    	mytime time.Time
    	myint  int
    	mybool = bool
    )
    
    type AdvancedDataTypeUser struct {
    	ID           sql.NullInt64
    	Name         *sql.NullString
    	Birthday     sql.NullTime
    	RegisteredAt mytime
    	DeletedAt    *mytime
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  9. schema/field_test.go

    		{Name: "FLOAT64", DBName: "ffloat64", BindNames: []string{"FLOAT64"}, DataType: schema.Float, Creatable: true, Updatable: true, Readable: true, Size: 64, Tag: `gorm:"column:ffloat64"`},
    		{Name: "BOOL", DBName: "fbool", BindNames: []string{"BOOL"}, DataType: schema.Bool, Creatable: true, Updatable: true, Readable: true, Tag: `gorm:"column:fbool"`},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  10. callbacks/update.go

    	if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && (db.Statement.Schema.BeforeSave || db.Statement.Schema.BeforeUpdate) {
    		callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) {
    			if db.Statement.Schema.BeforeSave {
    				if i, ok := value.(BeforeSaveInterface); ok {
    					called = true
    					db.AddError(i.BeforeSave(tx))
    				}
    			}
    
    			if db.Statement.Schema.BeforeUpdate {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
Back to top