Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for street (0.42 sec)

  1. tests/embedded_struct_test.go

    )
    
    func TestEmbeddedStruct(t *testing.T) {
    	type ReadOnly struct {
    		ReadOnly *bool
    	}
    
    	type BasePost struct {
    		Id    int64
    		Title string
    		URL   string
    		ReadOnly
    	}
    
    	type Author struct {
    		ID    string
    		Name  string
    		Email string
    	}
    
    	type HNPost struct {
    		BasePost
    		Author  `gorm:"EmbeddedPrefix:user_"` // Embedded struct
    		Upvotes int32
    	}
    
    	type EngadgetPost struct {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  2. logger/sql_test.go

    			NumericRegexp: nil,
    			Vars:          []interface{}{"jinzhu", 1, 999.99, true, []byte("12345"), tt, &tt, nil, "w@g.\"com", myrole, pwd, js, es},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    	type UserStat struct {
    		GroundDestroyCount int
    	}
    
    	type GameUser struct {
    		gorm.Model
    		StatAb UserStat `gorm:"embedded;embeddedPrefix:stat_ab_"`
    	}
    
    	type UserStat1 struct {
    		GroundDestroyCount string
    	}
    
    	type GroundRate struct {
    		GroundDestroyCount int
    	}
    
    	type GameUser1 struct {
    		gorm.Model
    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)
  4. logger/logger.go

    	// Warn warn log level
    	Warn
    	// Info info log level
    	Info
    )
    
    // Writer log writer interface
    type Writer interface {
    	Printf(string, ...interface{})
    }
    
    // Config logger config
    type Config struct {
    	SlowThreshold             time.Duration
    	Colorful                  bool
    	IgnoreRecordNotFoundError bool
    	ParameterizedQueries      bool
    	LogLevel                  LogLevel
    }
    
    // Interface logger interface
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  5. callbacks/create.go

    						if reflect.Indirect(rv).Kind() != reflect.Struct {
    							break
    						}
    
    						if _, isZero := pkField.ValueOf(db.Statement.Context, rv); isZero {
    							db.AddError(pkField.Set(db.Statement.Context, rv, insertID))
    							insertID += pkField.AutoIncrementIncrement
    						}
    					}
    				}
    			case reflect.Struct:
    				_, isZero := pkField.ValueOf(db.Statement.Context, db.Statement.ReflectValue)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  6. tests/gorm_test.go

    	switch dialect {
    	case "mysql", "sqlserver":
    		// these dialects do not support the "returning" clause
    		return
    	default:
    		// This user struct will leverage the existing users table, but override
    		// the Name field to default to null.
    		type user struct {
    			gorm.Model
    			Name string `gorm:"default:null"`
    		}
    		u1 := user{}
    
    		if results := DB.Create(&u1); results.Error != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jun 01 07:22:21 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  7. tests/table_test.go

    package tests_test
    
    import (
    	"regexp"
    	"sync"
    	"testing"
    
    	"gorm.io/driver/postgres"
    	"gorm.io/gorm"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils/tests"
    	. "gorm.io/gorm/utils/tests"
    )
    
    type UserWithTable struct {
    	gorm.Model
    	Name string
    }
    
    func (UserWithTable) TableName() string {
    	return "gorm.user"
    }
    
    func TestTable(t *testing.T) {
    	dryDB := DB.Session(&gorm.Session{DryRun: true})
    
    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)
  8. finisher_api.go

    		if _, ok := tx.Statement.Clauses["ON CONFLICT"]; !ok {
    			tx = tx.Clauses(clause.OnConflict{UpdateAll: true})
    		}
    		tx = tx.callbacks.Create().Execute(tx.Set("gorm:update_track_time", true))
    	case reflect.Struct:
    		if err := tx.Statement.Parse(value); err == nil && tx.Statement.Schema != nil {
    			for _, pf := range tx.Statement.Schema.PrimaryFields {
    				if _, isZero := pf.ValueOf(tx.Statement.Context, reflectValue); isZero {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  9. clause/limit_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestLimit(t *testing.T) {
    	limit0 := 0
    	limit10 := 10
    	limit50 := 50
    	limitNeg10 := -10
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Limit{
    				Limit:  &limit10,
    				Offset: 20,
    			}},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  10. errors.go

    	// ErrInvalidDB invalid db
    	ErrInvalidDB = errors.New("invalid db")
    	// ErrInvalidValue invalid value
    	ErrInvalidValue = errors.New("invalid value, should be pointer to struct or slice")
    	// ErrInvalidValueOfLength invalid values do not match length
    	ErrInvalidValueOfLength = errors.New("invalid association values, length doesn't match")
    	// ErrPreloadNotAllowed preload is not allowed when count is used
    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)
Back to top