Merge branch 'master' into scope_after_scan_method_callback
This commit is contained in:
commit
7c9ed0b311
2
scope.go
2
scope.go
@ -682,7 +682,7 @@ func (scope *Scope) buildCondition(clause map[string]interface{}, include bool)
|
|||||||
buff := bytes.NewBuffer([]byte{})
|
buff := bytes.NewBuffer([]byte{})
|
||||||
i := 0
|
i := 0
|
||||||
for _, s := range str {
|
for _, s := range str {
|
||||||
if s == '?' {
|
if s == '?' && len(replacements) > i {
|
||||||
buff.WriteString(replacements[i])
|
buff.WriteString(replacements[i])
|
||||||
i++
|
i++
|
||||||
} else {
|
} else {
|
||||||
|
12
wercker.yml
12
wercker.yml
@ -9,13 +9,6 @@ services:
|
|||||||
MYSQL_USER: gorm
|
MYSQL_USER: gorm
|
||||||
MYSQL_PASSWORD: gorm
|
MYSQL_PASSWORD: gorm
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
|
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
|
||||||
- name: mysql
|
|
||||||
id: mysql:8
|
|
||||||
env:
|
|
||||||
MYSQL_DATABASE: gorm
|
|
||||||
MYSQL_USER: gorm
|
|
||||||
MYSQL_PASSWORD: gorm
|
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
|
|
||||||
- name: mysql57
|
- name: mysql57
|
||||||
id: mysql:5.7
|
id: mysql:5.7
|
||||||
env:
|
env:
|
||||||
@ -109,11 +102,6 @@ build:
|
|||||||
code: |
|
code: |
|
||||||
GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mariadb:3306)/gorm?charset=utf8&parseTime=True" go test ./...
|
GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mariadb:3306)/gorm?charset=utf8&parseTime=True" go test ./...
|
||||||
|
|
||||||
- script:
|
|
||||||
name: test mysql
|
|
||||||
code: |
|
|
||||||
GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mysql:3306)/gorm?charset=utf8&parseTime=True" go test ./...
|
|
||||||
|
|
||||||
- script:
|
- script:
|
||||||
name: test mysql5.7
|
name: test mysql5.7
|
||||||
code: |
|
code: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user