-
-
Notifications
You must be signed in to change notification settings - Fork 59
Could not convert string into time #370
Copy link
Copy link
Open
Description
In one of my query I have the following error:
sql: Scan error on column index 0, name \"last_visited\": unsupported Scan, storing driver.Value type string into type *time.Time
I have reproduced the issue here: fairking/sql@94d95e4
2024/04/18 03:10:34 [duration: 0s op: adapter-query] SELECT MAX(last_visited) last_visited FROM "users" GROUP BY "users"."gender";
\go-rel\sqlite3\query.go:155:
Error Trace: /go-rel/sql/specs/query.go:155
Error: Expected nil, but got: &fmt.wrapError{msg:"sql: Scan error on column index 0, name \"last_visited\": unsupported Scan, storing driver.Value type string into type *time.Time", err:(*errors.errorString)(0xc0003ec6c0)}
Test: TestAdapter_specs/FindAll#35
--- FAIL: TestAdapter_specs/FindAll#35 (0.00s)
My struct:
type ContactItem struct {
LastVisited *time.Time `json:"lastVisited"`
}Any idea why that happen?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels