Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for street (0.16 sec)

  1. schema/model_test.go

    }
    
    type (
    	mytime time.Time
    	myint  int
    	mybool = bool
    )
    
    type AdvancedDataTypeUser struct {
    	ID           sql.NullInt64
    	Name         *sql.NullString
    	Birthday     sql.NullTime
    	RegisteredAt mytime
    	DeletedAt    *mytime
    	Active       mybool
    	Admin        *mybool
    }
    
    type BaseModel struct {
    	ID        uint
    	CreatedAt time.Time
    	CreatedBy *int
    	Created   *VersionUser `gorm:"foreignKey:CreatedBy"`
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  2. schema/schema_test.go

    			f.Readable = true
    		})
    	}
    }
    
    func TestEmbeddedStruct(t *testing.T) {
    	type CorpBase struct {
    		gorm.Model
    		OwnerID string
    	}
    
    	type Company struct {
    		ID      int
    		OwnerID int
    		Name    string
    		Ignored string `gorm:"-"`
    	}
    
    	type Corp struct {
    		CorpBase
    		Base Company `gorm:"embedded;embeddedPrefix:company_"`
    	}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  3. tests/serializer_test.go

    package tests_test
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"reflect"
    	"strings"
    	"testing"
    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/schema"
    	. "gorm.io/gorm/utils/tests"
    )
    
    type SerializerStruct struct {
    	gorm.Model
    	Name                   []byte                 `gorm:"json"`
    	Roles                  Roles                  `gorm:"serializer:json"`
    	Roles2                 *Roles                 `gorm:"serializer:json"`
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Apr 21 14:09:38 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  4. tests/preload_test.go

    func TestNestedPreloadWithNestedJoin(t *testing.T) {
    	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 Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. tests/error_translator_test.go

    	}
    }
    
    func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    	type City struct {
    		gorm.Model
    		Name string `gorm:"unique"`
    	}
    
    	type Museum struct {
    		gorm.Model
    		Name   string `gorm:"unique"`
    		CityID uint
    		City   City `gorm:"Constraint:OnUpdate:CASCADE,OnDelete:CASCADE;FOREIGNKEY:CityID;References:ID"`
    	}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jul 12 13:21:22 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  6. tests/joins_table_test.go

    import (
    	"testing"
    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    )
    
    type Person struct {
    	ID        int
    	Name      string
    	Addresses []Address `gorm:"many2many:person_addresses;"`
    	DeletedAt gorm.DeletedAt
    }
    
    type Address struct {
    	ID   uint
    	Name string
    }
    
    type PersonAddress struct {
    	PersonID  int
    	AddressID int
    	CreatedAt time.Time
    	DeletedAt gorm.DeletedAt
    }
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Sep 10 13:46:18 GMT 2020
    - 3.5K bytes
    - Viewed (0)
  7. callbacks/preload.go

    	if embeddedRelations == nil {
    		return nil
    	}
    	names := make([]string, 0, len(embeddedRelations.Relations)+len(embeddedRelations.EmbeddedRelations))
    	for _, relation := range embeddedRelations.Relations {
    		// skip first struct name
    		names = append(names, strings.Join(relation.Field.EmbeddedBindNames[1:], "."))
    	}
    	for _, relations := range embeddedRelations.EmbeddedRelations {
    		names = append(names, embeddedValues(relations)...)
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  8. tests/associations_belongs_to_test.go

    	AssertAssociationCount(t, users[1], "Company", 1, "After other user Delete")
    }
    
    func TestBelongsToDefaultValue(t *testing.T) {
    	type Org struct {
    		ID string
    	}
    	type BelongsToUser struct {
    		OrgID string
    		Org   Org `gorm:"default:NULL"`
    	}
    
    	tx := DB.Session(&gorm.Session{})
    	tx.Config.DisableForeignKeyConstraintWhenMigrating = true
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  9. callbacks/update.go

    			for i := 0; i < stmt.ReflectValue.Len(); i++ {
    				if stmt.ReflectValue.CanAddr() {
    					field.Set(stmt.Context, stmt.ReflectValue.Index(i), value)
    				}
    			}
    		}
    	case reflect.Struct:
    		assignValue = func(field *schema.Field, value interface{}) {
    			if stmt.ReflectValue.CanAddr() {
    				field.Set(stmt.Context, stmt.ReflectValue, value)
    			}
    		}
    	default:
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  10. statement.go

    	"reflect"
    	"regexp"
    	"sort"
    	"strconv"
    	"strings"
    	"sync"
    
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/logger"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils"
    )
    
    // Statement statement
    type Statement struct {
    	*DB
    	TableExpr            *clause.Expr
    	Table                string
    	Model                interface{}
    	Unscoped             bool
    	Dest                 interface{}
    	ReflectValue         reflect.Value
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
Back to top