Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for CurrentTable (0.3 sec)

  1. clause/clause.go

    			c.AfterExpression.Build(builder)
    		}
    	}
    }
    
    const (
    	PrimaryKey   string = "~~~py~~~" // primary key
    	CurrentTable string = "~~~ct~~~" // current table
    	Associations string = "~~~as~~~" // associations
    )
    
    var (
    	currentTable  = Table{Name: CurrentTable}
    	PrimaryColumn = Column{Table: CurrentTable, Name: PrimaryKey}
    )
    
    // Column quote with name
    type Column struct {
    	Table string
    	Name  string
    	Alias string
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Feb 02 09:15:08 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. migrator/migrator.go

    		if err := stmt.Parse(oldName); err == nil {
    			oldTable = m.CurrentTable(stmt)
    		} else {
    			return err
    		}
    	}
    
    	if v, ok := newName.(string); ok {
    		newTable = clause.Table{Name: v}
    	} else {
    		stmt := &gorm.Statement{DB: m.DB}
    		if err := stmt.Parse(newName); err == nil {
    			newTable = m.CurrentTable(stmt)
    		} else {
    			return err
    		}
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  3. clause/insert.go

    	if insert.Modifier != "" {
    		builder.WriteString(insert.Modifier)
    		builder.WriteByte(' ')
    	}
    
    	builder.WriteString("INTO ")
    	if insert.Table.Name == "" {
    		builder.WriteQuoted(currentTable)
    	} else {
    		builder.WriteQuoted(insert.Table)
    	}
    }
    
    // MergeClause merge insert clause
    func (insert Insert) MergeClause(clause *Clause) {
    	if v, ok := clause.Expression.(Insert); ok {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 09 09:07:00 GMT 2020
    - 767 bytes
    - Viewed (0)
  4. statement.go

    	case clause.Table:
    		if v.Name == clause.CurrentTable {
    			if stmt.TableExpr != nil {
    				stmt.TableExpr.Build(stmt)
    			} else {
    				write(v.Raw, stmt.Table)
    			}
    		} else {
    			write(v.Raw, v.Name)
    		}
    
    		if v.Alias != "" {
    			writer.WriteByte(' ')
    			write(v.Raw, v.Alias)
    		}
    	case clause.Column:
    		if v.Table != "" {
    			if v.Table == clause.CurrentTable {
    				write(v.Raw, stmt.Table)
    			} else {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  5. callbacks/query.go

    					if isRelations {
    						genJoinClause := func(joinType clause.JoinType, parentTableName string, relation *schema.Relationship) clause.Join {
    							tableAliasName := relation.Name
    							if parentTableName != clause.CurrentTable {
    								tableAliasName = utils.NestedRelationName(parentTableName, tableAliasName)
    							}
    
    							columnStmt := gorm.Statement{
    								Table: tableAliasName, DB: db, Schema: relation.FieldSchema,
    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. finisher_api.go

    func (db *DB) First(dest interface{}, conds ...interface{}) (tx *DB) {
    	tx = db.Limit(1).Order(clause.OrderByColumn{
    		Column: clause.Column{Table: clause.CurrentTable, Name: clause.PrimaryKey},
    	})
    	if len(conds) > 0 {
    		if exprs := tx.Statement.BuildCondition(conds[0], conds[1:]...); len(exprs) > 0 {
    			tx.Statement.AddClause(clause.Where{Exprs: exprs})
    		}
    	}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/JavadocConverter.java

                if (elementName.equals("table")) {
                    if (currentTable != null) {
                        throw new UnsupportedOperationException("A table within a table is not supported.");
                    }
                    currentTable = document.createElement("table");
                    nodes.push(currentTable);
                    return true;
                }
                if (elementName.equals("tr")) {
    Java
    - Registered: Wed Apr 17 11:36:08 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 29.3K bytes
    - Viewed (0)
  8. clause/from.go

    	if len(from.Tables) > 0 {
    		for idx, table := range from.Tables {
    			if idx > 0 {
    				builder.WriteByte(',')
    			}
    
    			builder.WriteQuoted(table)
    		}
    	} else {
    		builder.WriteQuoted(currentTable)
    	}
    
    	for _, join := range from.Joins {
    		builder.WriteByte(' ')
    		join.Build(builder)
    	}
    }
    
    // MergeClause merge from clause
    func (from From) MergeClause(clause *Clause) {
    	clause.Expression = from
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 15 02:25:10 GMT 2020
    - 630 bytes
    - Viewed (0)
  9. clause/from_test.go

    						{
    							Type:  clause.RightJoin,
    							Table: clause.Table{Name: "profiles"},
    							ON: clause.Where{
    								[]clause.Expression{clause.Eq{clause.Column{Table: "profiles", Name: "email"}, clause.Column{Table: clause.CurrentTable, Name: "email"}}},
    							},
    						},
    					},
    				}, clause.From{
    					Joins: []clause.Join{
    						{
    							Type:  clause.InnerJoin,
    							Table: clause.Table{Name: "articles"},
    							ON: clause.Where{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 15 02:25:10 GMT 2020
    - 1.9K bytes
    - Viewed (0)
  10. clause/update.go

    func (update Update) Build(builder Builder) {
    	if update.Modifier != "" {
    		builder.WriteString(update.Modifier)
    		builder.WriteByte(' ')
    	}
    
    	if update.Table.Name == "" {
    		builder.WriteQuoted(currentTable)
    	} else {
    		builder.WriteQuoted(update.Table)
    	}
    }
    
    // MergeClause merge update clause
    func (update Update) MergeClause(clause *Clause) {
    	if v, ok := clause.Expression.(Update); ok {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 09 09:07:00 GMT 2020
    - 737 bytes
    - Viewed (0)
Back to top