Add force index query mod for select query.
Fix eager loading casting for nested levels.
This commit is contained in:
parent
f892107dad
commit
4e1b83ab39
4 changed files with 32 additions and 3 deletions
queries
|
@ -76,7 +76,13 @@ func buildSelectQuery(q *Query) (*bytes.Buffer, []interface{}) {
|
|||
buf.WriteByte(')')
|
||||
}
|
||||
|
||||
fmt.Fprintf(buf, " FROM %s", strings.Join(strmangle.IdentQuoteSlice(q.dialect.LQ, q.dialect.RQ, q.from), ", "))
|
||||
if len(q.forceindex) > 0 {
|
||||
fmt.Fprintf(buf, " FROM %s FORCE INDEX (%s)", strings.Join(strmangle.IdentQuoteSlice(q.dialect.LQ, q.dialect.RQ, q.from), ", "),q.forceindex)
|
||||
|
||||
}else{
|
||||
fmt.Fprintf(buf, " FROM %s", strings.Join(strmangle.IdentQuoteSlice(q.dialect.LQ, q.dialect.RQ, q.from), ", "))
|
||||
|
||||
}
|
||||
|
||||
if len(q.joins) > 0 {
|
||||
argsLen := len(args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue