Class D1QueryMeta
- Namespace
- Cloudflare.NET.Accounts.D1.Models
- Assembly
- Cloudflare.NET.dll
Metadata about a D1 query execution.
public record D1QueryMeta : IEquatable<D1QueryMeta>
- Inheritance
-
D1QueryMeta
- Implements
- Inherited Members
Constructors
D1QueryMeta(bool, int, double, long, long, long, string?, bool?, string?, long?, D1QueryTimings?, int?)
Metadata about a D1 query execution.
public D1QueryMeta(bool ChangedDb, int Changes, double Duration, long LastRowId, long RowsRead, long RowsWritten, string? ServedBy = null, bool? ServedByPrimary = null, string? ServedByRegion = null, long? SizeAfter = null, D1QueryTimings? Timings = null, int? TotalAttempts = null)
Parameters
ChangedDbboolWhether the database was modified by this query.
ChangesintApproximate number of rows modified (from sqlite3_total_changes).
DurationdoubleDuration of SQL execution inside the database (ms).
LastRowIdlongRow ID of last inserted row (for INTEGER PRIMARY KEY tables, null for WITHOUT ROWID tables).
RowsReadlongNumber of rows read during execution (including indices).
RowsWrittenlongNumber of rows written during execution (including indices).
ServedBystringVersion of Cloudflare's backend Worker that returned the result.
ServedByPrimarybool?Whether the query was handled by the primary instance.
ServedByRegionstringRegion code of the instance that handled the query.
SizeAfterlong?Database size in bytes after the query committed.
TimingsD1QueryTimingsDetailed timing information.
TotalAttemptsint?Number of execution attempts for read-only queries (D1 auto-retries up to 2 times).
Properties
ChangedDb
Whether the database was modified by this query.
[JsonPropertyName("changed_db")]
public bool ChangedDb { get; init; }
Property Value
Changes
Approximate number of rows modified (from sqlite3_total_changes).
[JsonPropertyName("changes")]
public int Changes { get; init; }
Property Value
Duration
Duration of SQL execution inside the database (ms).
[JsonPropertyName("duration")]
public double Duration { get; init; }
Property Value
LastRowId
Row ID of last inserted row (for INTEGER PRIMARY KEY tables, null for WITHOUT ROWID tables).
[JsonPropertyName("last_row_id")]
public long LastRowId { get; init; }
Property Value
RowsRead
Number of rows read during execution (including indices).
[JsonPropertyName("rows_read")]
public long RowsRead { get; init; }
Property Value
RowsWritten
Number of rows written during execution (including indices).
[JsonPropertyName("rows_written")]
public long RowsWritten { get; init; }
Property Value
ServedBy
Version of Cloudflare's backend Worker that returned the result.
[JsonPropertyName("served_by")]
public string? ServedBy { get; init; }
Property Value
ServedByPrimary
Whether the query was handled by the primary instance.
[JsonPropertyName("served_by_primary")]
public bool? ServedByPrimary { get; init; }
Property Value
- bool?
ServedByRegion
Region code of the instance that handled the query.
[JsonPropertyName("served_by_region")]
public string? ServedByRegion { get; init; }
Property Value
SizeAfter
Database size in bytes after the query committed.
[JsonPropertyName("size_after")]
public long? SizeAfter { get; init; }
Property Value
- long?
Timings
Detailed timing information.
[JsonPropertyName("timings")]
public D1QueryTimings? Timings { get; init; }
Property Value
TotalAttempts
Number of execution attempts for read-only queries (D1 auto-retries up to 2 times).
[JsonPropertyName("total_attempts")]
public int? TotalAttempts { get; init; }
Property Value
- int?