D1 now returns `rows_written` and `rows_read` in the metadata for every query. Documentation landing

D1 now returns rows_written and rows_read in the metadata for every query. Documentation landing soon. e.g.
➜  wrangler d1 execute db-enam --command "INSERT INTO users(email_address,created_at,deleted,settings) VALUES ('me@example.com,', 1687904983, null, '{}')" --json
[
  {
    "results": [],
    "success": true,
    "meta": {
      "duration": 0.17432300001382828,
      "size_after": 45137920,
      "rows_read": 0,
      "rows_written": 2 // Two rows: one to the table, and one to the index as there's an index on created_at for this table
    }
  }
]
Was this page helpful?