@@ -355,33 +355,34 @@ The `:cache_hits` key is only included if the collection is rendered with `cache
355
355
356
356
#### ` sql.active_record `
357
357
358
- | Key | Value |
359
- | -------------------- | ---------------------------------------- |
360
- | ` :sql ` | SQL statement |
361
- | ` :name ` | Name of the operation |
362
- | ` :connection ` | Connection object |
363
- | ` :transaction ` | Current transaction, if any |
364
- | ` :binds ` | Bind parameters |
365
- | ` :type_casted_binds ` | Typecasted bind parameters |
366
- | ` :statement_name ` | SQL Statement name |
367
- | ` :async ` | ` true ` if query is loaded asynchronously |
368
- | ` :cached ` | ` true ` is added when cached queries used |
369
- | ` :row_count ` | Number of rows returned by the query |
370
- | ` :affected_rows ` | Number of rows affected by the query |
358
+ | Key | Value |
359
+ | -------------------- | ------------------------------------------------------ |
360
+ | ` :sql ` | SQL statement |
361
+ | ` :name ` | Name of the operation |
362
+ | ` :binds ` | Bind parameters |
363
+ | ` :type_casted_binds ` | Typecasted bind parameters |
364
+ | ` :async ` | ` true ` if query is loaded asynchronously |
365
+ | ` :connection ` | Connection object |
366
+ | ` :transaction ` | Current transaction, if any |
367
+ | ` :affected_rows ` | Number of rows affected by the query |
368
+ | ` :row_count ` | Number of rows returned by the query |
369
+ | ` :cached ` | ` true ` is added when result comes from the query cache |
370
+ | ` :statement_name ` | SQL Statement name (Postgres only) |
371
371
372
372
Adapters may add their own data as well.
373
373
374
374
``` ruby
375
375
{
376
376
sql: " SELECT \" posts\" .* FROM \" posts\" " ,
377
377
name: " Post Load" ,
378
- connection: < ActiveRecord ::ConnectionAdapters ::SQLite3Adapter: 0x00007f9f7a838850 > ,
379
- transaction: < ActiveRecord ::ConnectionAdapters ::RealTransaction: 0x0000000121b5d3e0 >
380
378
binds: [< ActiveModel ::Attribute ::WithCastValue: 0x00007fe19d15dc00 > ],
381
379
type_casted_binds: [11 ],
382
- statement_name: nil ,
383
- row_count: 5 ,
380
+ async: false ,
381
+ connection: < ActiveRecord ::ConnectionAdapters ::SQLite3Adapter: 0x00007f9f7a838850 > ,
382
+ transaction: < ActiveRecord ::ConnectionAdapters ::RealTransaction: 0x0000000121b5d3e0 >
384
383
affected_rows: 0
384
+ row_count: 5 ,
385
+ statement_name: nil ,
385
386
}
386
387
```
387
388
0 commit comments