|
|
@ -93,7 +93,11 @@ func IsNotNull(predicate Predicate) string { |
|
|
|
} |
|
|
|
|
|
|
|
func Include(predicate Predicate) string { |
|
|
|
return fmt.Sprintf(" and %s in (%s)", predicate.ColumnName, strings.Join(RepeatStrings("?", len(predicate.Values)), ",")) |
|
|
|
if predicate.Values != nil && len(predicate.Values) > 0 { |
|
|
|
return fmt.Sprintf(" and %s in (%s)", predicate.ColumnName, strings.Join(RepeatStrings("?", len(predicate.Values)), ",")) |
|
|
|
} else { |
|
|
|
return " and 1 <> 1" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func Exclude(predicate Predicate) string { |
|
|
|