From 74725e8e112fddfb3d112594232ef35ee8e8fabe Mon Sep 17 00:00:00 2001 From: go-jet Date: Sat, 14 Dec 2019 18:32:40 +0100 Subject: [PATCH] Clean up. --- internal/jet/sql_builder.go | 1 - qrm/utill_test.go | 2 ++ tests/postgres/insert_test.go | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/jet/sql_builder.go b/internal/jet/sql_builder.go index 95bd0b6..f71ca1e 100644 --- a/internal/jet/sql_builder.go +++ b/internal/jet/sql_builder.go @@ -165,7 +165,6 @@ func argToString(value interface{}) string { func integerTypesToString(value interface{}) string { switch bindVal := value.(type) { - case bool: case int: return strconv.FormatInt(int64(bindVal), 10) case uint: diff --git a/qrm/utill_test.go b/qrm/utill_test.go index e4ab53d..168c55f 100644 --- a/qrm/utill_test.go +++ b/qrm/utill_test.go @@ -32,4 +32,6 @@ func TestIsSimpleModelType(t *testing.T) { assert.Equal(t, isSimpleModelType(reflect.TypeOf(complexModelType)), false) assert.Equal(t, isSimpleModelType(reflect.TypeOf(&complexModelType)), false) + assert.Equal(t, isSimpleModelType(reflect.TypeOf([]string{"str"})), false) + assert.Equal(t, isSimpleModelType(reflect.TypeOf([]int{1, 2})), false) } diff --git a/tests/postgres/insert_test.go b/tests/postgres/insert_test.go index ee402b8..161ffed 100644 --- a/tests/postgres/insert_test.go +++ b/tests/postgres/insert_test.go @@ -24,7 +24,6 @@ RETURNING link.id AS "link.id", link.name AS "link.name", link.description AS "link.description"; ` - Link.ID.Name() insertQuery := Link.INSERT(Link.ID, Link.URL, Link.Name, Link.Description). VALUES(100, "http://www.postgresqltutorial.com", "PostgreSQL Tutorial", DEFAULT). VALUES(101, "http://www.google.com", "Google", DEFAULT).