Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for Cool (0.34 sec)

  1. migrator/index.go

    }
    
    // PrimaryKey returns the index is primary key or not.
    func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) {
    	return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid
    }
    
    // Unique returns whether the index is unique or not.
    func (idx Index) Unique() (unique bool, ok bool) {
    	return idx.UniqueValue.Bool, idx.UniqueValue.Valid
    }
    
    // Option return the optional attribute of the index
    func (idx Index) Option() string {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Apr 11 02:32:46 GMT 2023
    - 1023 bytes
    - Viewed (0)
  2. callbacks/associations.go

    		}
    	} else {
    		onConflict.DoNothing = true
    	}
    
    	return
    }
    
    func saveAssociations(db *gorm.DB, rel *schema.Relationship, rValues reflect.Value, selectColumns map[string]bool, restricted bool, defaultUpdatingColumns []string) error {
    	// stop save association loop
    	if checkAssociationsSaved(db, rValues) {
    		return nil
    	}
    
    	var (
    		selects, omits []string
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. clause/expression.go

    }
    
    // Expr raw expression
    type Expr struct {
    	SQL                string
    	Vars               []interface{}
    	WithoutParentheses bool
    }
    
    // Build build raw expression
    func (expr Expr) Build(builder Builder) {
    	var (
    		afterParenthesis bool
    		idx              int
    	)
    
    	for _, v := range []byte(expr.SQL) {
    		if v == '?' && len(expr.Vars) > idx {
    			if afterParenthesis || expr.WithoutParentheses {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  4. utils/utils.go

    		}
    	}
    
    	return ""
    }
    
    func IsValidDBNameChar(c rune) bool {
    	return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '.' && c != '*' && c != '_' && c != '$' && c != '@'
    }
    
    // CheckTruth check string true or not
    func CheckTruth(vals ...string) bool {
    	for _, val := range vals {
    		if val != "" && !strings.EqualFold(val, "false") {
    			return true
    		}
    	}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. migrator/migrator.go

    func (m Migrator) ReorderModels(values []interface{}, autoAdd bool) (results []interface{}) {
    	type Dependency struct {
    		*gorm.Statement
    		Depends []*schema.Schema
    	}
    
    	var (
    		modelNames, orderedModelNames []string
    		orderedModelNamesMap          = map[string]bool{}
    		parsedSchemas                 = map[*schema.Schema]bool{}
    		valuesMap                     = map[string]Dependency{}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  6. logger/sql.go

    	"strings"
    	"time"
    	"unicode"
    
    	"gorm.io/gorm/utils"
    )
    
    const (
    	tmFmtWithMS = "2006-01-02 15:04:05.999"
    	tmFmtZero   = "0000-00-00 00:00:00"
    	nullStr     = "NULL"
    )
    
    func isPrintable(s string) bool {
    	for _, r := range s {
    		if !unicode.IsPrint(r) {
    			return false
    		}
    	}
    	return true
    }
    
    // A list of Go types that should be converted to SQL primitives
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. schema/schema_helper_test.go

    	t.Run("CheckSchema/"+s.Name, func(t *testing.T) {
    		tests.AssertObjEqual(t, s, v, "Name", "Table")
    
    		for idx, field := range primaryFields {
    			var found bool
    			for _, f := range s.PrimaryFields {
    				if f.Name == field {
    					found = true
    				}
    			}
    
    			if idx == 0 {
    				if field != s.PrioritizedPrimaryField.Name {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. schema/naming.go

    }
    
    var _ Namer = (*NamingStrategy)(nil)
    
    // NamingStrategy tables, columns naming strategy
    type NamingStrategy struct {
    	TablePrefix         string
    	SingularTable       bool
    	NameReplacer        Replacer
    	NoLowerCase         bool
    	IdentifierMaxLength int
    }
    
    // TableName convert string to table name
    func (ns NamingStrategy) TableName(str string) string {
    	if ns.SingularTable {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  9. tests/callbacks_test.go

    func c5(*gorm.DB) {}
    func c6(*gorm.DB) {}
    
    func TestCallbacks(t *testing.T) {
    	type callback struct {
    		name    string
    		before  string
    		after   string
    		remove  bool
    		replace bool
    		err     string
    		match   func(*gorm.DB) bool
    		h       func(*gorm.DB)
    	}
    
    	datas := []struct {
    		callbacks []callback
    		err       string
    		results   []string
    	}{
    		{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. callbacks/query.go

    				}
    			}
    
    			specifiedRelationsName := make(map[string]interface{})
    			for _, join := range db.Statement.Joins {
    				if db.Statement.Schema != nil {
    					var isRelations bool // is relations or raw sql
    					var relations []*schema.Relationship
    					relation, ok := db.Statement.Schema.Relationships.Relations[join.Name]
    					if ok {
    						isRelations = true
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
Back to top