Declared type.

This commit is contained in:
Nuno Cruces
2023-12-01 02:38:56 +00:00
parent 9c562f5d8b
commit c667a1f469
8 changed files with 126 additions and 75 deletions

View File

@@ -72,6 +72,17 @@ func TestDriver(t *testing.T) {
}
defer rows.Close()
typs, err := rows.ColumnTypes()
if err != nil {
t.Fatal(err)
}
if got := typs[0].DatabaseTypeName(); got != "INT" {
t.Errorf("got %s, want INT", got)
}
if got := typs[1].DatabaseTypeName(); got != "VARCHAR" {
t.Errorf("got %s, want INT", got)
}
row := 0
ids := []int{0, 1, 2}
names := []string{"go", "zig", "whatever"}