Move to own sql abstraction on top of jmoiron/sqlx
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package sq
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func fmtSQLPrint(sql string) string {
|
||||
if strings.Contains(sql, ";") {
|
||||
return "(...multi...)"
|
||||
}
|
||||
|
||||
sql = strings.ReplaceAll(sql, "\r", "")
|
||||
sql = strings.ReplaceAll(sql, "\n", " ")
|
||||
|
||||
return sql
|
||||
}
|
||||
Reference in New Issue
Block a user