Merge 3bbc5c5793dddcbf5abf9b625659826adb5d4d87 into f3e2da5ba359f0d672249fc52f54ae41c5a66d3a
This commit is contained in:
		
						commit
						2c1bc0bd65
					
				@ -21,7 +21,7 @@ func (limit Limit) Build(builder Builder) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	if limit.Offset > 0 {
 | 
						if limit.Offset > 0 {
 | 
				
			||||||
		if limit.Limit > 0 {
 | 
							if limit.Limit > 0 {
 | 
				
			||||||
			builder.WriteString(" ")
 | 
								builder.WriteByte(' ')
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		builder.WriteString("OFFSET ")
 | 
							builder.WriteString("OFFSET ")
 | 
				
			||||||
		builder.WriteString(strconv.Itoa(limit.Offset))
 | 
							builder.WriteString(strconv.Itoa(limit.Offset))
 | 
				
			||||||
 | 
				
			|||||||
@ -72,9 +72,9 @@ func buildExprs(exprs []Expression, builder Builder, joinCond string) {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if wrapInParentheses {
 | 
							if wrapInParentheses {
 | 
				
			||||||
			builder.WriteString(`(`)
 | 
								builder.WriteByte('(')
 | 
				
			||||||
			expr.Build(builder)
 | 
								expr.Build(builder)
 | 
				
			||||||
			builder.WriteString(`)`)
 | 
								builder.WriteByte(')')
 | 
				
			||||||
			wrapInParentheses = false
 | 
								wrapInParentheses = false
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			expr.Build(builder)
 | 
								expr.Build(builder)
 | 
				
			||||||
 | 
				
			|||||||
@ -130,7 +130,7 @@ func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) {
 | 
				
			|||||||
		writer.WriteByte('(')
 | 
							writer.WriteByte('(')
 | 
				
			||||||
		for idx, d := range v {
 | 
							for idx, d := range v {
 | 
				
			||||||
			if idx > 0 {
 | 
								if idx > 0 {
 | 
				
			||||||
				writer.WriteString(",")
 | 
									writer.WriteByte(',')
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			stmt.QuoteTo(writer, d)
 | 
								stmt.QuoteTo(writer, d)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -143,7 +143,7 @@ func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) {
 | 
				
			|||||||
		writer.WriteByte('(')
 | 
							writer.WriteByte('(')
 | 
				
			||||||
		for idx, d := range v {
 | 
							for idx, d := range v {
 | 
				
			||||||
			if idx > 0 {
 | 
								if idx > 0 {
 | 
				
			||||||
				writer.WriteString(",")
 | 
									writer.WriteByte(',')
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			stmt.DB.Dialector.QuoteTo(writer, d)
 | 
								stmt.DB.Dialector.QuoteTo(writer, d)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
				
			|||||||
@ -49,7 +49,7 @@ func (DummyDialector) QuoteTo(writer clause.Writer, str string) {
 | 
				
			|||||||
				shiftDelimiter = 0
 | 
									shiftDelimiter = 0
 | 
				
			||||||
				underQuoted = false
 | 
									underQuoted = false
 | 
				
			||||||
				continuousBacktick = 0
 | 
									continuousBacktick = 0
 | 
				
			||||||
				writer.WriteString("`")
 | 
									writer.WriteByte('`')
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			writer.WriteByte(v)
 | 
								writer.WriteByte(v)
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
@ -74,7 +74,7 @@ func (DummyDialector) QuoteTo(writer clause.Writer, str string) {
 | 
				
			|||||||
	if continuousBacktick > 0 && !selfQuoted {
 | 
						if continuousBacktick > 0 && !selfQuoted {
 | 
				
			||||||
		writer.WriteString("``")
 | 
							writer.WriteString("``")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	writer.WriteString("`")
 | 
						writer.WriteByte('`')
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (DummyDialector) Explain(sql string, vars ...interface{}) string {
 | 
					func (DummyDialector) Explain(sql string, vars ...interface{}) string {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user