File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/content/docs/d1/worker-api Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ The methods [`D1PreparedStatement::run`](/d1/worker-api/prepared-statements/#run
2525 success: boolean, // true if the operation was successful, false otherwise
2626 meta: {
2727 served_by: string // the version of Cloudflare's backend Worker that returned the result
28+ served_by_region: string // the region of the database instance that executed the query
29+ served_by_primary: boolean // true if (and only if) the database instance that executed the query was the primary
30+ timings: {
31+ sql_duration_ms: number // the duration of the SQL query execution by the database instance (not including any network time)
32+ }
2833 duration: number, // the duration of the SQL query execution only, in milliseconds
2934 changes: number, // the number of changes made to the database
3035 last_row_id: number, // the last inserted row ID, only applies when the table is defined without the `WITHOUT ROWID` option
@@ -45,16 +50,21 @@ const stmt = env.DB.prepare("SELECT * FROM Customers WHERE CompanyName = ?").bin
4550const returnValue = await stmt .run ();
4651return Response .json (returnValue)
4752```
48- ``` js
53+ ``` json
4954{
5055 "success" : true ,
5156 "meta" : {
5257 "served_by" : " miniflare.db" ,
53- " duration" : 1 ,
58+ "served_by_region" : " WEUR" ,
59+ "served_by_primary" : true ,
60+ "timings" : {
61+ "sql_duration_ms" : 0.2552
62+ },
63+ "duration" : 0.2552 ,
5464 "changes" : 0 ,
5565 "last_row_id" : 0 ,
5666 "changed_db" : false ,
57- " size_after" : 8192 ,
67+ "size_after" : 16384 ,
5868 "rows_read" : 4 ,
5969 "rows_written" : 0
6070 },
You can’t perform that action at this time.
0 commit comments