Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 71 for Cool (0.12 sec)

  1. callbacks/callbacks.go

    	deleteClauses = []string{"DELETE", "FROM", "WHERE"}
    )
    
    type Config struct {
    	LastInsertIDReversed bool
    	CreateClauses        []string
    	QueryClauses         []string
    	UpdateClauses        []string
    	DeleteClauses        []string
    }
    
    func RegisterDefaultCallbacks(db *gorm.DB, config *Config) {
    	enableTransaction := func(db *gorm.DB) bool {
    		return !db.SkipDefaultTransaction
    	}
    
    	if len(config.CreateClauses) == 0 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Oct 27 23:56:55 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  2. tests/error_translator_test.go

    		Name string `gorm:"unique"`
    	}
    
    	db, err := OpenTestConnection(&gorm.Config{TranslateError: true})
    	if err != nil {
    		t.Fatalf("failed to connect database, got error %v", err)
    	}
    
    	dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": true, "sqlserver": true}
    	if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) {
    		return
    	}
    
    	DB.Migrator().DropTable(&City{})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 12 13:21:22 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. utils/tests/dummy_dialecter.go

    func (DummyDialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) {
    	writer.WriteByte('?')
    }
    
    func (DummyDialector) QuoteTo(writer clause.Writer, str string) {
    	var (
    		underQuoted, selfQuoted bool
    		continuousBacktick      int8
    		shiftDelimiter          int8
    	)
    
    	for _, v := range []byte(str) {
    		switch v {
    		case '`':
    			continuousBacktick++
    			if continuousBacktick == 2 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 06 06:03:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. schema/schema_test.go

    		{Name: "DeletedAt", DBName: "deleted_at", BindNames: []string{"DeletedAt"}, DataType: schema.Time},
    		{Name: "Active", DBName: "active", BindNames: []string{"Active"}, DataType: schema.Bool},
    		{Name: "Admin", DBName: "admin", BindNames: []string{"Admin"}, DataType: schema.Bool},
    	}
    
    	for i := range fields {
    		checkSchemaField(t, user, &fields[i], func(f *schema.Field) {
    			f.Creatable = true
    			f.Updatable = true
    			f.Readable = true
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  5. callbacks/preload.go

    	preloadNames := make([]string, 0, len(preloadMap))
    	for key := range preloadMap {
    		preloadNames = append(preloadNames, key)
    	}
    	sort.Strings(preloadNames)
    
    	isJoined := func(name string) (joined bool, nestedJoins []string) {
    		for _, join := range joins {
    			if _, ok := relationships.Relations[join]; ok && name == join {
    				joined = true
    				continue
    			}
    			joinNames := strings.SplitN(join, ".", 2)
    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)
  6. tests/serializer_test.go

    		sps := SerializerPostgresStruct(*s)
    		return &sps
    	}
    	return s
    }
    
    type Roles []string
    
    type Job struct {
    	Title    string
    	Number   int
    	Location string
    	IsIntern bool
    }
    
    type EncryptedString string
    
    func (es *EncryptedString) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error) {
    	switch value := dbValue.(type) {
    	case []byte:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 21 14:09:38 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  7. tests/multi_primary_keys_test.go

    }
    
    type Tag struct {
    	ID     uint   `gorm:"primary_key"`
    	Locale string `gorm:"primary_key"`
    	Value  string
    	Blogs  []*Blog `gorm:"many2many:blog_tags"`
    }
    
    func compareTags(tags []Tag, contents []string) bool {
    	var tagContents []string
    	for _, tag := range tags {
    		tagContents = append(tagContents, tag.Value)
    	}
    	sort.Strings(tagContents)
    	sort.Strings(contents)
    	return reflect.DeepEqual(tagContents, contents)
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  8. gorm.go

    type Session struct {
    	DryRun                   bool
    	PrepareStmt              bool
    	NewDB                    bool
    	Initialized              bool
    	SkipHooks                bool
    	SkipDefaultTransaction   bool
    	DisableNestedTransaction bool
    	AllowGlobalUpdate        bool
    	FullSaveAssociations     bool
    	QueryFields              bool
    	Context                  context.Context
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  9. schema/field.go

    	PrimaryKey             bool
    	AutoIncrement          bool
    	AutoIncrementIncrement int64
    	Creatable              bool
    	Updatable              bool
    	Readable               bool
    	AutoCreateTime         TimeType
    	AutoUpdateTime         TimeType
    	HasDefaultValue        bool
    	DefaultValue           string
    	DefaultValueInterface  interface{}
    	NotNull                bool
    	Unique                 bool
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  10. clause/on_conflict.go

    package clause
    
    type OnConflict struct {
    	Columns      []Column
    	Where        Where
    	TargetWhere  Where
    	OnConstraint string
    	DoNothing    bool
    	DoUpdates    Set
    	UpdateAll    bool
    }
    
    func (OnConflict) Name() string {
    	return "ON CONFLICT"
    }
    
    // Build build onConflict clause
    func (onConflict OnConflict) Build(builder Builder) {
    	if onConflict.OnConstraint != "" {
    		builder.WriteString("ON CONSTRAINT ")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Oct 07 05:46:20 GMT 2022
    - 1.3K bytes
    - Viewed (0)
Back to top