-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature LIKE & NOT LIKE condition. #103
Conversation
105ccf5
to
94701cb
Compare
condition.go
Outdated
|
||
func buildLikeCmp(d Dialect, buf Buffer, pred string, column string, value interface{}) error { | ||
if value == nil { | ||
return ErrColumnNotSpecified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrColumnNotSpecified
is not for this.
condition.go
Outdated
} | ||
fallthrough | ||
default: | ||
return ErrColumnNotSpecified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrColumnNotSpecified is not for this
case reflect.Ptr, reflect.Interface: // pointer or interface | ||
// for pointers & interfaces check | ||
return buildLikeCmp(d, buf, pred, column, v.Elem().Interface()) | ||
case reflect.Slice: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems weird to me to support slice. Could you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an implementation that takes into consideration that byte slice or rune slice comes in
What's the status of this pr? |
will this be merged? it seems like a useful feature... |
66668ec
to
b70ec46
Compare
b70ec46
to
8f3da24
Compare
Wanted to check in here - will this be merged? |
Add LIKE & NOT LIKE feature to condition.go for fuzzy search using LIKE
LIKE syntax is below
NOT LIKE syntax is below
this is the same as #75 contents