Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for tablet (0.16 sec)

  1. clause/from.go

    // 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 15 02:25:10 GMT 2020
    - 630 bytes
    - Viewed (0)
  2. schema/naming.go

    )
    
    // Namer namer interface
    type Namer interface {
    	TableName(table string) string
    	SchemaName(table string) string
    	ColumnName(table, column string) string
    	JoinTableName(joinTable string) string
    	RelationshipFKName(Relationship) string
    	CheckerName(table, column string) string
    	IndexName(table, column string) string
    	UniqueName(table, column string) string
    }
    
    // Replacer replacer interface like strings.Replacer
    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)
  3. migrator/migrator.go

    		currentDatabase := m.DB.Migrator().CurrentDatabase()
    		return m.DB.Raw("SELECT count(*) FROM information_schema.tables WHERE table_schema = ? AND table_name = ? AND table_type = ?", currentDatabase, stmt.Table, "BASE TABLE").Row().Scan(&count)
    	})
    
    	return count > 0
    }
    
    // RenameTable rename table from oldName to newName
    func (m Migrator) RenameTable(oldName, newName interface{}) error {
    	var oldTable, newTable interface{}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  4. chainable_api.go

    			if results[1] != "" {
    				tx.Statement.Table = results[1]
    			} else {
    				tx.Statement.Table = results[2]
    			}
    		}
    	} else if tables := strings.Split(name, "."); len(tables) == 2 {
    		tx.Statement.TableExpr = &clause.Expr{SQL: tx.Statement.Quote(name)}
    		tx.Statement.Table = tables[1]
    	} else if name != "" {
    		tx.Statement.TableExpr = &clause.Expr{SQL: tx.Statement.Quote(name)}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  5. callbacks/query.go

    										Column: clause.Column{Table: parentTableName, Name: ref.PrimaryKey.DBName},
    										Value:  clause.Column{Table: tableAliasName, Name: ref.ForeignKey.DBName},
    									}
    								} else {
    									if ref.PrimaryValue == "" {
    										exprs[idx] = clause.Eq{
    											Column: clause.Column{Table: parentTableName, Name: ref.ForeignKey.DBName},
    											Value:  clause.Column{Table: tableAliasName, Name: ref.PrimaryKey.DBName},
    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)
  6. clause/locking.go

    )
    
    type Locking struct {
    	Strength string
    	Table    Table
    	Options  string
    }
    
    // Name where clause name
    func (locking Locking) Name() string {
    	return "FOR"
    }
    
    // Build build where clause
    func (locking Locking) Build(builder Builder) {
    	builder.WriteString(locking.Strength)
    	if locking.Table.Name != "" {
    		builder.WriteString(" OF ")
    		builder.WriteQuoted(locking.Table)
    	}
    
    	if locking.Options != "" {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 773 bytes
    - Viewed (0)
  7. schema/schema_helper_test.go

    				if r.JoinTable.Name != relation.JoinTable.Name {
    					t.Errorf("schema %v relation's join table name expects %v, but got %v", s, relation.JoinTable.Name, r.JoinTable.Name)
    				}
    
    				if r.JoinTable.Table != relation.JoinTable.Table {
    					t.Errorf("schema %v relation's join table tablename expects %v, but got %v", s, relation.JoinTable.Table, r.JoinTable.Table)
    				}
    
    				for i := range relation.JoinTable.Fields {
    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. clause/benchmarks_test.go

    	"gorm.io/gorm/utils/tests"
    )
    
    func BenchmarkSelect(b *testing.B) {
    	user, _ := schema.Parse(&tests.User{}, &sync.Map{}, db.NamingStrategy)
    
    	for i := 0; i < b.N; i++ {
    		stmt := gorm.Statement{DB: db, Table: user.Table, Schema: user, Clauses: map[string]clause.Clause{}}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Oct 07 12:14:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  9. migrator/index.go

    type Index struct {
    	TableName       string
    	NameValue       string
    	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
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Apr 11 02:32:46 GMT 2023
    - 1023 bytes
    - Viewed (0)
  10. tests/scopes_test.go

    		t.Errorf("Should found two users's name in 1, 3, but got %v", len(users3))
    	}
    
    	db := DB.Scopes(func(tx *gorm.DB) *gorm.DB {
    		return tx.Table("custom_table")
    	}).Session(&gorm.Session{})
    
    	db.AutoMigrate(&User{})
    	if db.Find(&User{}).Statement.Table != "custom_table" {
    		t.Errorf("failed to call Scopes")
    	}
    
    	result := DB.Scopes(NameIn1And2, func(tx *gorm.DB) *gorm.DB {
    		return tx.Session(&gorm.Session{})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 3.3K bytes
    - Viewed (0)
Back to top