Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for general (0.58 sec)

  1. schema/naming.go

    }
    
    // RelationshipFKName generate fk name for relation
    func (ns NamingStrategy) RelationshipFKName(rel Relationship) string {
    	return ns.formatName("fk", rel.Schema.Table, ns.toDBName(rel.Name))
    }
    
    // CheckerName generate checker name
    func (ns NamingStrategy) CheckerName(table, column string) string {
    	return ns.formatName("chk", table, column)
    }
    
    // IndexName generate index name
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  2. tests/postgres_test.go

    	}
    }
    
    type Post struct {
    	ID         uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
    	Title      string
    	Categories []*Category `gorm:"Many2Many:post_categories"`
    }
    
    type Category struct {
    	ID    uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
    	Title string
    	Posts []*Post `gorm:"Many2Many:post_categories"`
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Oct 08 09:16:32 GMT 2022
    - 6.4K bytes
    - Viewed (3)
  3. logger/sql.go

    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
    		return true
    	case reflect.Float32, reflect.Float64:
    		return true
    	default:
    		return false
    	}
    }
    
    // ExplainSQL generate SQL string with given parameters, the generated SQL is expected to be used in logger, execute it might introduce a SQL injection vulnerability
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. tests/migrate_test.go

    	if DB.Dialector.Name() != "postgres" {
    		return
    	}
    
    	type MissPKLanguage struct {
    		ID   string `gorm:"type:uuid;default:uuid_generate_v4()"`
    		Name string
    	}
    
    	type MissPKUser struct {
    		ID              string           `gorm:"type:uuid;default:uuid_generate_v4()"`
    		MissPKLanguages []MissPKLanguage `gorm:"many2many:miss_pk_user_languages;"`
    	}
    
    	var err error
    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)
  5. tests/scanner_valuer_test.go

    	stmt := dryRunDB.Create(&UserWithPoint{
    		Name:  "jinzhu",
    		Point: Point{X: 100, Y: 100},
    	}).Statement
    
    	if stmt.SQL.String() == "" || len(stmt.Vars) != 2 {
    		t.Errorf("Failed to generate sql, got %v", stmt.SQL.String())
    	}
    
    	if !regexp.MustCompile(`INSERT INTO .user_with_points. \(.name.,.point.\) VALUES \(.+,ST_PointFromText\(.+\)\)`).MatchString(stmt.SQL.String()) {
    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)
  6. tests/sql_builder_test.go

    	stmt := dryRunDB.Create(&user).Statement
    	if stmt.SQL.String() == "" || len(stmt.Vars) != 9 {
    		t.Errorf("Failed to generate sql, got %v", stmt.SQL.String())
    	}
    
    	stmt2 := dryRunDB.Find(&user, "id = ?", user.ID).Statement
    	if stmt2.SQL.String() == "" || len(stmt2.Vars) != 1 {
    		t.Errorf("Failed to generate sql, got %v", stmt2.SQL.String())
    	}
    }
    
    type ageInt int8
    
    func (ageInt) String() string {
    	return "age"
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  7. gorm.go

    	// FullSaveAssociations full save associations
    	FullSaveAssociations bool
    	// Logger
    	Logger logger.Interface
    	// NowFunc the function to be used when creating a new timestamp
    	NowFunc func() time.Time
    	// DryRun generate sql without execute
    	DryRun bool
    	// PrepareStmt executes the given query in cached statement
    	PrepareStmt bool
    	// DisableAutomaticPing
    	DisableAutomaticPing bool
    	// DisableForeignKeyConstraintWhenMigrating
    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)
Back to top