Global AND and OR functions for better indentation of a complex condition in the Go code and in the generated SQL.
This commit is contained in:
parent
8ffbe38993
commit
9f91fd705a
17 changed files with 338 additions and 44 deletions
|
|
@ -6,6 +6,15 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// This functions can be used, instead of its method counterparts, to have a better indentation of a complex condition
|
||||
// in the Go code and in the generated SQL.
|
||||
var (
|
||||
// AND function adds AND operator between expressions.
|
||||
AND = jet.AND
|
||||
// OR function adds OR operator between expressions.
|
||||
OR = jet.OR
|
||||
)
|
||||
|
||||
// ROW is construct one table row from list of expressions.
|
||||
func ROW(expressions ...Expression) Expression {
|
||||
return jet.NewFunc("", expressions, nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue