Path: redb/redb.SQLite/Query/SqliteQueryProvider.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.SQLite/Query/SqliteQueryProvider.cs
----
using Microsoft.Extensions.Logging;
using redb.Core.Data;
using redb.Core.Models.Configuration;
using redb.Core.Providers;
using redb.Core.Query;
using redb.Core.Query.Base;
using redb.Core.Query.QueryExpressions;
using redb.Core.Serialization;
using redb.SQLite.Data;
using redb.SQLite.Sql;
namespace redb.SQLite.Query;
///
/// SQLite query provider implementation.
/// Inherits from QueryProviderBase and provides SQLite-specific components.
///
public partial class SqliteQueryProvider : QueryProviderBase
{
///
/// The first row of as a JSON object, or null when there is none. SQLite has no
/// row_to_json, so the analytics read their rows through IRedbContext.QueryRowsAsJsonAsync (one command and one
/// telemetry span, as on the other providers); they used to read on the raw connection, which opened no span.
///
private async Task FirstRowAsJsonAsync(string sql)
{
var json = await _context.QueryRowsAsJsonAsync(sql, System.Array.Empty