Skip to content

Commit

Permalink
Persist ((value)) values as a (('value')) to help the optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard93 committed May 15, 2018
1 parent 6d6e05b commit 509e513
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Form/JSON/SQL.cls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ result: out=" WHERE Text='Admin' AND Text='1'"]]></Description>
}
set value = valTemp _ ")"
} else {
set value = $$$sq(value)
// bake ((value)) values as a (('value')) to help the optimizer
if (($e(value,1,2)="((") && ($e(value,*-1,*)="))")) {
set value = $e(value, 3,*-3)
set value = $$$sq(value)
set value = "((" _ value _ "))"
} else {
set value = $$$sq(value)
}
set:value="'$$$NULL'" value = "NULL"
}
Expand Down

0 comments on commit 509e513

Please sign in to comment.