trying to run a mock for count() function in sqlite returns "couldnt match acqual sql". Since we are using regex.MatchString in query.go. Any suggestion? Here is the sample program that fails to match the actual sql to reproduce
=====
package main
import (
"fmt"
"regexp"
)
func main() {
actual := "select studentId, count() from dept group by studentId"
expect := "select studentId, count() from dept group by studentId"
re, err := regexp.Compile(expect)
if err != nil {
fmt.Printf(" err %s \n", err)
}
if !re.MatchString(actual) {
fmt.Printf(` could not match actual sql: "%s" with expected regexp "%s"`, actual, re.String())
}
}
trying to run a mock for count() function in sqlite returns "couldnt match acqual sql". Since we are using regex.MatchString in query.go. Any suggestion? Here is the sample program that fails to match the actual sql to reproduce
===== package main
import ( "fmt" "regexp" )
func main() { actual := "select studentId, count() from dept group by studentId" expect := "select studentId, count() from dept group by studentId" re, err := regexp.Compile(expect) if err != nil { fmt.Printf(" err %s \n", err) } if !re.MatchString(actual) { fmt.Printf(` could not match actual sql: "%s" with expected regexp "%s"`, actual, re.String()) } }