-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow trailing spaces in bulk inseriton via named queries, fix #690
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,7 +224,7 @@ func bindStruct(bindType int, query string, arg interface{}, m *reflectx.Mapper) | |
return bound, arglist, nil | ||
} | ||
|
||
var valueBracketReg = regexp.MustCompile(`\([^(]*.[^(]\)$`) | ||
var valueBracketReg = regexp.MustCompile(`\([^(]*.[^(]\)\s*$`) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
matthisk
|
||
|
||
func fixBound(bound string, loop int) string { | ||
loc := valueBracketReg.FindStringIndex(bound) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Need to account for
space
,;
and other things people might want to do likeON CONFLICT
etc.Sorry for a lot of places I am posting this. Comment here
#667 (comment)