Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 127 for name (0.15 sec)

  1. migrator/index.go

    	ColumnList      []string
    	PrimaryKeyValue sql.NullBool
    	UniqueValue     sql.NullBool
    	OptionValue     string
    }
    
    // Table return the table name of the index.
    func (idx Index) Table() string {
    	return idx.TableName
    }
    
    // Name return the name of the index.
    func (idx Index) Name() string {
    	return idx.NameValue
    }
    
    // Columns return the columns of the index
    func (idx Index) Columns() []string {
    	return idx.ColumnList
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 02:32:46 GMT 2023
    - 1023 bytes
    - Viewed (0)
  2. callbacks/associations.go

    		onConflict     = onConflictOption(db.Statement, rel.FieldSchema, defaultUpdatingColumns)
    		refName        = rel.Name + "."
    		values         = rValues.Interface()
    	)
    
    	for name, ok := range selectColumns {
    		columnName := ""
    		if strings.HasPrefix(name, refName) {
    			columnName = strings.TrimPrefix(name, refName)
    		}
    
    		if columnName != "" {
    			if ok {
    				selects = append(selects, columnName)
    			} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. clause/benchmarks_test.go

    				clause.Gt{Column: "age", Value: 18},
    				clause.Or(clause.Neq{Column: "name", Value: "jinzhu"}),
    			}},
    			clause.Where{Exprs: []clause.Expression{
    				clause.Or(clause.Gt{Column: "score", Value: 100}, clause.Like{Column: "name", Value: "%linus%"}),
    			}},
    			clause.GroupBy{Columns: []clause.Column{{Name: "role"}}, Having: []clause.Expression{clause.Eq{"role", "admin"}}},
    			clause.Limit{Limit: &limit10, Offset: 20},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Oct 07 12:14:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. soft_delete.go

    		}
    	}
    	return sql.NullString{Valid: false}
    }
    
    type SoftDeleteQueryClause struct {
    	ZeroValue sql.NullString
    	Field     *schema.Field
    }
    
    func (sd SoftDeleteQueryClause) Name() string {
    	return ""
    }
    
    func (sd SoftDeleteQueryClause) Build(clause.Builder) {
    }
    
    func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause) {
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  5. clause/from.go

    package clause
    
    // From from clause
    type From struct {
    	Tables []Table
    	Joins  []Join
    }
    
    // Name from clause name
    func (from From) Name() string {
    	return "FROM"
    }
    
    // Build build from clause
    func (from From) Build(builder Builder) {
    	if len(from.Tables) > 0 {
    		for idx, table := range from.Tables {
    			if idx > 0 {
    				builder.WriteByte(',')
    			}
    
    			builder.WriteQuoted(table)
    		}
    	} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 15 02:25:10 GMT 2020
    - 630 bytes
    - Viewed (0)
  6. utils/utils.go

    // NestedRelationName nested relationships like `Manager__Company`
    func NestedRelationName(prefix, name string) string {
    	return prefix + nestedRelationSplit + name
    }
    
    // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}`
    func SplitNestedRelationName(name string) []string {
    	return strings.Split(name, nestedRelationSplit)
    }
    
    // JoinNestedRelationNames nested relationships like `Manager__Company`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  7. tests/migrate_test.go

    	checkField(&UniqueStruct5{}, "name", false, "idx_unique_struct5_name")
    	checkField(&UniqueStruct6{}, "name", false, "idx_unique_struct6_name")
    
    	checkField(&UniqueStruct7{}, "name", false, "")
    	checkField(&UniqueStruct7{}, "nick_name", false, "")
    	checkField(&UniqueStruct7{}, "nick_name", false, "")
    
    	type UniqueStruct8 struct { // unique and uniqueIndex
    		Name string `gorm:"size:60;unique;index:my_us8_index,unique;"`
    	}
    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)
  8. tests/group_by_test.go

    	}
    
    	if err := DB.Model(&User{}).Select("name, sum(age) as total").Where("name LIKE ?", "groupby%").Group("name").Having("name = ?", "groupby1").Row().Scan(&name, &total); err != nil {
    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    	if name != "groupby1" || total != 660 {
    		t.Errorf("name should be groupby, but got %v, total should be 660, but got %v", name, total)
    	}
    
    	result := struct {
    		Name  string
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  9. tests/table_test.go

    	if !regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE name = .+ AND .users.\\..deleted_at. IS NULL\\) as u, \\(SELECT .name. FROM .pets. WHERE name = .+ AND .pets.\\..deleted_at. IS NULL\\) as p WHERE name = .+ AND name = .+ AND .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. schema/naming_test.go

    	if tableName != "public.company" {
    		t.Errorf("invalid table name generated, got %v", tableName)
    	}
    
    	columdName := ns.ColumnName("", "NameCID")
    	if columdName != "name_cid" {
    		t.Errorf("invalid column name generated, got %v", columdName)
    	}
    }
    
    type CustomReplacer struct {
    	f func(string) string
    }
    
    func (r CustomReplacer) Replace(name string) string {
    	return r.f(name)
    }
    
    func TestCustomReplacer(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
Back to top