Skip to content

Commit

Permalink
fix: table value is backup
Browse files Browse the repository at this point in the history
  • Loading branch information
juunini committed Aug 9, 2023
1 parent e6aa321 commit 0664992
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions order/traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ func traverse(table string, tables *map[string]string, filter map[string]any, re

prefix := ""

if table != "" {
prefix = table + "."
}

if tables != nil {
for k, v := range *tables {
if k == field {
prefix = v + "."
break
}
}
} else {
if table != "" {
prefix = table + "."
}
}

orders = append(orders, prefix+field+" "+direction.(string))
Expand Down
8 changes: 4 additions & 4 deletions where/traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ func traverse(dialector, table string, tables *map[string]string, input map[stri

prefix := ""

if table != "" {
prefix = table + "."
}

if tables != nil {
for k, v := range *tables {
if k == key {
prefix = v + "."
break
}
}
} else {
if table != "" {
prefix = table + "."
}
}

query, args := filter(dialector, prefix+key, value.(map[string]any))
Expand Down

0 comments on commit 0664992

Please sign in to comment.