mirror of https://github.com/go-gorm/gorm.git
Fix nil condition
This commit is contained in:
parent
287ae22ca6
commit
42f934d60e
|
@ -48,7 +48,7 @@ func (scope *Scope) buildWhereCondition(clause map[string]interface{}) (str stri
|
|||
|
||||
args := clause["args"].([]interface{})
|
||||
for _, arg := range args {
|
||||
switch reflect.TypeOf(arg).Kind() {
|
||||
switch reflect.ValueOf(arg).Kind() {
|
||||
case reflect.Slice: // For where("id in (?)", []int64{1,2})
|
||||
values := reflect.ValueOf(arg)
|
||||
var tempMarks []string
|
||||
|
@ -110,7 +110,7 @@ func (scope *Scope) buildNotCondition(clause map[string]interface{}) (str string
|
|||
|
||||
args := clause["args"].([]interface{})
|
||||
for _, arg := range args {
|
||||
switch reflect.TypeOf(arg).Kind() {
|
||||
switch reflect.ValueOf(arg).Kind() {
|
||||
case reflect.Slice: // For where("id in (?)", []int64{1,2})
|
||||
values := reflect.ValueOf(arg)
|
||||
var tempMarks []string
|
||||
|
@ -138,7 +138,7 @@ func (scope *Scope) buildSelectQuery(clause map[string]interface{}) (str string)
|
|||
|
||||
args := clause["args"].([]interface{})
|
||||
for _, arg := range args {
|
||||
switch reflect.TypeOf(arg).Kind() {
|
||||
switch reflect.ValueOf(arg).Kind() {
|
||||
case reflect.Slice:
|
||||
values := reflect.ValueOf(arg)
|
||||
var tempMarks []string
|
||||
|
|
Loading…
Reference in New Issue