Table of Contents

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

ChangedDb bool

Whether the database was modified by this query.

Changes int

Approximate number of rows modified (from sqlite3_total_changes).

Duration double

Duration of SQL execution inside the database (ms).

LastRowId long

Row ID of last inserted row (for INTEGER PRIMARY KEY tables, null for WITHOUT ROWID tables).

RowsRead long

Number of rows read during execution (including indices).

RowsWritten long

Number of rows written during execution (including indices).

ServedBy string

Version of Cloudflare's backend Worker that returned the result.

ServedByPrimary bool?

Whether the query was handled by the primary instance.

ServedByRegion string

Region code of the instance that handled the query.

SizeAfter long?

Database size in bytes after the query committed.

Timings D1QueryTimings

Detailed timing information.

TotalAttempts int?

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

bool

Changes

Approximate number of rows modified (from sqlite3_total_changes).

[JsonPropertyName("changes")]
public int Changes { get; init; }

Property Value

int

Duration

Duration of SQL execution inside the database (ms).

[JsonPropertyName("duration")]
public double Duration { get; init; }

Property Value

double

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

long

RowsRead

Number of rows read during execution (including indices).

[JsonPropertyName("rows_read")]
public long RowsRead { get; init; }

Property Value

long

RowsWritten

Number of rows written during execution (including indices).

[JsonPropertyName("rows_written")]
public long RowsWritten { get; init; }

Property Value

long

ServedBy

Version of Cloudflare's backend Worker that returned the result.

[JsonPropertyName("served_by")]
public string? ServedBy { get; init; }

Property Value

string

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

string

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

D1QueryTimings

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?