Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for hint (0.15 sec)

  1. .github/workflows/reviewdog.yml

    name: reviewdog
    on: [pull_request]
    jobs:
      golangci-lint:
        name: runner / golangci-lint
        runs-on: ubuntu-latest
        steps:
          - name: Check out code into the Go module directory
            uses: actions/checkout@v4
          - name: golangci-lint
            uses: reviewdog/action-golangci-lint@v2
    
          - name: Setup reviewdog
            uses: reviewdog/action-setup@v1
    
          - name: gofumpt -s with reviewdog
            env:
    Others
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:50:45 GMT 2023
    - 664 bytes
    - Viewed (0)
  2. schema/field_test.go

    		{Name: "INT", DBName: "fint", BindNames: []string{"INT"}, DataType: schema.Int, Creatable: true, Updatable: true, Readable: true, Size: 64, Tag: `gorm:"column:fint"`},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  3. README.md

    * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point
    * Context, Prepared Statement Mode, DryRun Mode
    * Batch Insert, FindInBatches, Find To Map
    * SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr
    * Composite Primary Key
    * Auto Migrations
    * Logger
    * Extendable, flexible plugin API: Database Resolver (Multiple Databases, Read/Write Splitting) / Prometheus…
    Plain Text
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:20:06 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  4. tests/associations_test.go

    	}
    }
    
    func TestForeignKeyConstraints(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    	type Profile struct {
    		ID       uint
    		Name     string
    		MemberID uint
    	}
    
    	type Member struct {
    		ID      uint
    		Refer   uint `gorm:"uniqueIndex"`
    		Name    string
    		Profile Profile `gorm:"Constraint:OnUpdate:CASCADE,OnDelete:CASCADE;FOREIGNKEY:MemberID;References:Refer"`
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. schema/field.go

    const (
    	UnixTime        TimeType = 1
    	UnixSecond      TimeType = 2
    	UnixMillisecond TimeType = 3
    	UnixNanosecond  TimeType = 4
    )
    
    // GORM fields types
    const (
    	Bool   DataType = "bool"
    	Int    DataType = "int"
    	Uint   DataType = "uint"
    	Float  DataType = "float"
    	String DataType = "string"
    	Time   DataType = "time"
    	Bytes  DataType = "bytes"
    )
    
    const DefaultAutoIncrementIncrement int64 = 1
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  6. utils/utils_test.go

    	tests := []struct {
    		name string
    		in   interface{}
    		out  string
    	}{
    		{"int", math.MaxInt64, "9223372036854775807"},
    		{"int8", int8(math.MaxInt8), "127"},
    		{"int16", int16(math.MaxInt16), "32767"},
    		{"int32", int32(math.MaxInt32), "2147483647"},
    		{"int64", int64(math.MaxInt64), "9223372036854775807"},
    		{"uint", uint(math.MaxUint64), "18446744073709551615"},
    		{"uint8", uint8(math.MaxUint8), "255"},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. schema/schema.go

    			schema.FieldsWithDefaultDBValue = append(schema.FieldsWithDefaultDBValue, field)
    		}
    	}
    
    	if field := schema.PrioritizedPrimaryField; field != nil {
    		switch field.GORMDataType {
    		case Int, Uint:
    			if _, ok := field.TagSettings["AUTOINCREMENT"]; !ok {
    				if !field.HasDefaultValue || field.DefaultValueInterface != nil {
    					schema.FieldsWithDefaultDBValue = append(schema.FieldsWithDefaultDBValue, field)
    				}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  8. tests/query_test.go

    			t.Errorf("Unexpected result on pluck name, got %+v", names)
    		}
    	}
    
    	for idx, id := range ids {
    		if int(id) != int(users[idx].ID) {
    			t.Errorf("Unexpected result on pluck id, got %+v", ids)
    		}
    	}
    
    	for idx, id := range ids2 {
    		if int(id) != int(users[idx].ID+1) {
    			t.Errorf("Unexpected result on pluck id, got %+v", ids)
    		}
    	}
    
    	var times []time.Time
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  9. tests/sql_builder_test.go

    	if !regexp.MustCompile(`.*age.*=0.123457,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    }
    
    func TestGroupConditions(t *testing.T) {
    	type Pizza struct {
    		ID   uint
    		Name string
    		Size string
    	}
    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	stmt := dryRunDB.Where(
    		DB.Where("pizza = ?", "pepperoni").Where(DB.Where("size = ?", "small").Or("size = ?", "medium")),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  10. schema/relationship_test.go

    	type Toy struct {
    		ID        int
    		Name      string
    		OwnerID   int
    		OwnerType string
    	}
    	type User struct {
    		ID  int
    		Cat struct {
    			Name string
    			Toy  Toy   `gorm:"polymorphic:Owner;"`
    			Toys []Toy `gorm:"polymorphic:Owner;"`
    		} `gorm:"embedded;embeddedPrefix:cat_"`
    		Dog struct {
    			ID     int
    			Name   string
    			UserID int
    			Toy    Toy   `gorm:"polymorphic:Owner;"`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top