Move []types.EventNID back to rows.Next()

This commit is contained in:
Till Faelligen 2022-05-10 16:15:04 +02:00
parent 5141a41eb2
commit eb1cb6ed5f

View file

@ -123,11 +123,11 @@ func (s *stateBlockStatements) BulkSelectStateBlockEntries(
i := 0
var stateBlockNID types.StateBlockNID
var result json.RawMessage
var r []types.EventNID
for ; rows.Next(); i++ {
if err = rows.Scan(&stateBlockNID, &result); err != nil {
return nil, err
}
var r []types.EventNID
if err = json.Unmarshal(result, &r); err != nil {
return nil, fmt.Errorf("json.Unmarshal: %w", err)
}