Fix for SELECT_JSON_ARR generates incorrect order by, limit and offset clauses for mariadb.
This commit is contained in:
parent
adef2f9b1a
commit
7d4aa4cdab
4 changed files with 168 additions and 48 deletions
|
|
@ -190,6 +190,10 @@ type ClauseOrderBy struct {
|
|||
SkipNewLine bool
|
||||
}
|
||||
|
||||
func (o *ClauseOrderBy) serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
o.Serialize(statementType, out, options...)
|
||||
}
|
||||
|
||||
// Serialize serializes clause into SQLBuilder
|
||||
func (o *ClauseOrderBy) Serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
if o.List == nil {
|
||||
|
|
@ -219,6 +223,10 @@ type ClauseLimit struct {
|
|||
Count int64
|
||||
}
|
||||
|
||||
func (o *ClauseLimit) serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
o.Serialize(statementType, out, options...)
|
||||
}
|
||||
|
||||
// Serialize serializes clause into SQLBuilder
|
||||
func (l *ClauseLimit) Serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
if l.Count >= 0 {
|
||||
|
|
@ -233,6 +241,10 @@ type ClauseOffset struct {
|
|||
Count IntegerExpression
|
||||
}
|
||||
|
||||
func (o *ClauseOffset) serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
o.Serialize(statementType, out, options...)
|
||||
}
|
||||
|
||||
// Serialize serializes clause into SQLBuilder
|
||||
func (o *ClauseOffset) Serialize(statementType StatementType, out *SQLBuilder, options ...SerializeOption) {
|
||||
if is.Nil(o.Count) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue