sqliteclidriver: clear content from ret if sentinel was found
This commit is contained in:
parent
5c44dc5f54
commit
0866e5edac
@ -286,7 +286,13 @@ func (s *SCStmt) Query(args []driver.Value) (driver.Rows, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if !wasSentinel {
|
||||
if wasSentinel {
|
||||
// There was no data.
|
||||
// Wipe out `ret`
|
||||
ret = nil
|
||||
|
||||
} else {
|
||||
// There was data.
|
||||
// Need to decode again (from the same decoder reader) until we find the sentinel
|
||||
surplus := []map[string]any{}
|
||||
err = decoder.Decode(&surplus)
|
||||
|
Loading…
Reference in New Issue
Block a user