2019-04-03 11:03:07 +02:00
|
|
|
package sqlbuilder
|
|
|
|
|
|
|
|
|
|
type StringExpression interface {
|
|
|
|
|
Expression
|
|
|
|
|
|
|
|
|
|
Eq(expression StringExpression) BoolExpression
|
2019-05-06 12:42:15 +02:00
|
|
|
EqString(value string) BoolExpression
|
2019-04-03 11:03:07 +02:00
|
|
|
NotEq(expression StringExpression) BoolExpression
|
2019-05-06 12:42:15 +02:00
|
|
|
NotEqString(value string) BoolExpression
|
2019-04-03 11:03:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type stringInterfaceImpl struct {
|
|
|
|
|
parent StringExpression
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (b *stringInterfaceImpl) Eq(expression StringExpression) BoolExpression {
|
2019-05-06 12:42:15 +02:00
|
|
|
return Eq(b.parent, expression)
|
2019-04-03 11:03:07 +02:00
|
|
|
}
|
|
|
|
|
|
2019-05-06 12:42:15 +02:00
|
|
|
func (b *stringInterfaceImpl) EqString(value string) BoolExpression {
|
|
|
|
|
return EqL(b.parent, value)
|
2019-04-03 11:03:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (b *stringInterfaceImpl) NotEq(expression StringExpression) BoolExpression {
|
2019-05-06 12:42:15 +02:00
|
|
|
return NotEq(b.parent, expression)
|
2019-04-03 11:03:07 +02:00
|
|
|
}
|
2019-04-04 13:07:21 +02:00
|
|
|
|
2019-05-06 12:42:15 +02:00
|
|
|
func (b *stringInterfaceImpl) NotEqString(value string) BoolExpression {
|
|
|
|
|
return NotEq(b.parent, Literal(value))
|
2019-04-04 13:07:21 +02:00
|
|
|
}
|