(t *testing.T)
| 371 | } |
| 372 | |
| 373 | func TestSelectSliceMapTimeContext(t *testing.T) { |
| 374 | RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { |
| 375 | loadDefaultFixtureContext(ctx, db, t) |
| 376 | rows, err := db.QueryxContext(ctx, "SELECT * FROM person") |
| 377 | if err != nil { |
| 378 | t.Fatal(err) |
| 379 | } |
| 380 | for rows.Next() { |
| 381 | _, err := rows.SliceScan() |
| 382 | if err != nil { |
| 383 | t.Error(err) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | rows, err = db.QueryxContext(ctx, "SELECT * FROM person") |
| 388 | if err != nil { |
| 389 | t.Fatal(err) |
| 390 | } |
| 391 | for rows.Next() { |
| 392 | m := map[string]interface{}{} |
| 393 | err := rows.MapScan(m) |
| 394 | if err != nil { |
| 395 | t.Error(err) |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | }) |
| 400 | } |
| 401 | |
| 402 | func TestNilReceiverContext(t *testing.T) { |
| 403 | RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { |
nothing calls this directly
no test coverage detected