better unknown type log
This commit is contained in:
parent
fb6955465a
commit
19e7157c7b
2
db.go
2
db.go
@ -158,7 +158,7 @@ func (db *Db) QueryAssociativeArray(query string) (Rows, error) {
|
||||
if reflect.ValueOf(val).IsNil() {
|
||||
m[colName] = nil
|
||||
} else {
|
||||
fmt.Printf("Unknow type : %s", columnType[colName])
|
||||
fmt.Printf("Unknow type : %s (%s)\n", columnType[colName], query)
|
||||
m[colName] = fmt.Sprintf("%v", *val)
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ func TestPgCreateTable(t *testing.T) {
|
||||
db := Open("postgres", "host=127.0.0.1 port=5432 user=test password=test dbname=test sslmode=disable")
|
||||
defer db.Close()
|
||||
|
||||
byteValue, _ := os.ReadFile("test_table.json")
|
||||
byteValue, _ := os.ReadFile("testtype_table.json")
|
||||
|
||||
var jsonSource TableInfo
|
||||
json.Unmarshal([]byte(byteValue), &jsonSource)
|
||||
|
Loading…
Reference in New Issue
Block a user