lidavidm commented on code in PR #2254:
URL: https://github.com/apache/arrow-adbc/pull/2254#discussion_r1800282821
##########
go/adbc/driver/snowflake/connection.go:
##########
@@ -73,9 +73,51 @@ type connectionImpl struct {
useHighPrecision bool
}
+func escapeSingleQuoteForLike(arg string) string {
+ if len(arg) == 0 {
+ return arg
+ }
+
+ idx := strings.IndexByte(arg, '\'')
+ if idx == -1 {
+ return arg
+ }
+
+ var b strings.Builder
+ b.Grow(len(arg))
+
+ for {
+ before, after, found := strings.Cut(arg, `'`)
+ b.WriteString(before)
+ if !found {
+ return b.String()
+ }
+
+ if before[len(before)-1] != '\\' {
+ b.WriteByte('\\')
+ }
Review Comment:
I guess not from our own spec :sweat_smile:, we specify escapes aren't
supported at all
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]