Merge branch 'master' into scope_after_scan_method_callback

This commit is contained in:
Moises P. Sena 2018-03-03 09:57:24 -03:00 committed by GitHub
commit 7c9ed0b311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -682,7 +682,7 @@ func (scope *Scope) buildCondition(clause map[string]interface{}, include bool)
buff := bytes.NewBuffer([]byte{})
i := 0
for _, s := range str {
if s == '?' {
if s == '?' && len(replacements) > i {
buff.WriteString(replacements[i])
i++
} else {

View File

@ -9,13 +9,6 @@ services:
MYSQL_USER: gorm
MYSQL_PASSWORD: gorm
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
id: mysql:5.7
env:
@ -109,11 +102,6 @@ build:
code: |
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:
name: test mysql5.7
code: |