.NET MAUI on the WebRun your MAUI app in the browser on WebAssembly - real DOM elements, no Blazor. Try the web sample and the .NET MAUI GalleryRun your MAUI app in the browser on WebAssembly - real DOM elements, no Blazor. Try the web sample and the .NET MAUI GalleryGet started
.NET MAUI on Apple TVNative UIKit views driven by the Siri Remote and the tvOS focus engineNative UIKit views driven by the Siri Remote and the tvOS focus engineGet started
Universal Hubs Hubs - The SignalR but with transports for Bluetooth, HTTP/Network, & Peer Nearby Connectivity - ULTRA Comms for your appsHubs - The SignalR but with transports for Bluetooth, HTTP/Network, & Peer Nearby Connectivity - ULTRA Comms for your appsLet's Communicate
Controls 3.0MAUI & Blazor NET11 SupportMAUI & Blazor NET11 Support
The database bridge is a database client on the device. It opens SQLite files in the app’s
file roots where they are, so asking a 4 GB file for twenty rows costs twenty rows, not the
file. A page gets the schema, runs scripts with cancel and query plans, pages through a sorted, filtered and editable
datasheet, designs tables, moves CSV in and out, and keeps a query history. SQLite is the only engine that ships; any
other engine plugs in as a driver the app writes (see Other engines).
Every request names its database in one of two ways:
A SQLite file:root and path, exactly as the files bridge names a file. The
page can only open files it could already read and write. POST database/create makes a new, empty database
(409 exists if something is already at the path).
A connection:connection and an optional database, served by a driver the app registered.
GET database/connections lists them, and POST database/databases with { connection } lists the databases on
that connection’s server that its login may open (names, or error saying why the server could not be asked).
A request that names neither or both answers 400. An unknown root, or a connection no driver serves, answers 404.
A path with . or .. segments answers 400 invalid_path. A folder picked through Android’s Storage Access Framework
has no paths SQLite can open, so it answers 400.
Errors are answers. A statement that won’t parse, a constraint refusing a value, or a file that isn’t a
database comes back in the response’s error with a 200. Only a request the bridge can’t route fails.
Scripts:POST database/query runs one statement or a whole script. Every result set comes back, with each
statement’s row count and the line any error happened on. Each result set is capped at maxRows. explain: true
returns EXPLAIN QUERY PLAN as a tree and runs nothing. schemaChanged says whether to read the schema again.
Cancel: give a run a runId and POST database/query/cancel with it to stop the run. A statement that
passes StatementTimeout is interrupted too. Either way the answer has cancelled: true.
The datasheet:rows, rows/count and rows/totals page, sort, filter and search one table on the
device. Every column is checked against the schema, and every value is a parameter. Each row carries its key (SQLite’s
rowid). rows/insert, rows/update and rows/delete write by that key and answer with the row as it now stands.
A delete is all or nothing. A BLOB is shown as its length and first bytes, and value reads one whole.
Design:design/preview turns a table design into the DDL that makes it, including SQLite’s rebuild for
column changes, with notes on what it will do. Nothing runs until the page sends that script to query. object
drops or renames a table, view, index or trigger, or with preview: true says what it would run.
CSV:import/preview detects a CSV’s delimiter, header and column kinds. import reads it into a new or
existing table in one transaction: a refused line leaves the table as it was and reports the line. export writes a
table view or one statement’s answer as UTF-8 CSV with a byte-order mark to a file in a root. The CSV comes from
csvRoot/csvPath or from csvText the page already has.
History: every run is recorded per database, except record: false and Explain runs. A repeat of the last
statement is recorded once. history, history/clear, saved and saved/save read and keep it. It lives in the
app’s data directory, outside every file root.
Platforms: every head (Android, iOS, Mac Catalyst, macOS, Windows and Linux). Microsoft.Data.Sqlite carries
SQLite’s native library for each.
A driver implements IDatabaseDriver and serves the DatabaseConnectionTargets it recognises. The bridge resolves
each request, picks the first driver that serves it, and handles cancel, history and CSV itself. The driver keeps its
connections and their secrets. The page only sees the id, name and engine from GetConnectionsAsync, and the databases
a connection can open from GetDatabaseNamesAsync (the SQLite driver answers that with an error: a file is one
database).
RowView, SqlSpelling, QueryPlans, DatabaseCsv, TableDesigner.Wrong and TableDesigner.DesignOf are public, so
a driver writes its datasheet SQL and design checks the same way the SQLite driver does.
Writes a new, empty SQLite database — with the header a file needs before other tools will admit it is a database — at a path in a file root. Refused when something is already there.
The tables and views in a database, and the columns, indexes, keys, checks and triggers of each. No row counts: a count is a full scan on a table without a narrow index, so it is asked separately (CountDatabaseTableRows).
The columns whose values name one row, and so whether a row can be edited at all: empty means it cannot. SQLite's is rowid, which a view and a WITHOUT ROWID table do not have; a server's is the primary key.
schema
string | null
A server's namespace — dbo, public. Null on SQLite.
What sort of value a column holds, decided on the device from the engine's own type names, so the page can pick an editor and an alignment without knowing that bit, boolean and SQLite's BOOLEAN are one idea. The value itself still travels as the engine's own text.
Runs SQL — one statement or a script — and answers with every result set it produced and what each statement said. This can write: it is a database client. What it cannot do on SQLite is leave the file it was opened on — ATTACH and load_extension are refused by SQLite's authorizer before a statement can run.
sql
string
maxRows?
number
The cap on each result set, 1–100,000. Each result says whether it bit.
explain?
boolean
Ask how each statement would be answered rather than answering it, as a plan tree.
runId?
string | null
The page's name for this run, so CancelDatabaseQuery can stop it.
record?
boolean
Whether this run goes into the database's query history.
One page of one table's rows, each with the key that names it. Paged, sorted and filtered on the device: every column a filter or sort names is checked against the table, and every value is a parameter.
table
string
maxRows?
number
The page size, 1–5,000.
offset?
number
Where the page starts, in the order the sort gives. The key always ends the order, so pages are stable.
How a filter compares a column with its value. The comparisons read the value back through the column's own type; the text ones compare the column's text, case-insensitively.
Adds one record and answers with it as it stands afterwards — defaults, the number the engine gave it, whatever a trigger made of it. A column left out takes the table's default. The table and column names are checked against the schema and every value is a parameter.
The DDL that would make a table what a design says, to be read before it is run. Applying it is running that text with RunDatabaseQuery, so what somebody approved is what runs.
A first look at a CSV: its delimiter, whether it has a header, what each column seems to be, and the engine's type for each. From a file in a file root (csvRoot and csvPath) or from text the page already has (csvText) — exactly one.
Reads a CSV into a table — a new one made to the mapping, or one that exists — in one transaction: an import that stops part way leaves the table as it was, with the line that stopped it in the answer.
Writes a table — filtered and sorted as a datasheet shows it — or one statement's answer to a CSV file in a file root, streamed from the engine on the device. Exactly one of table and sql. The file is UTF-8 with a byte-order mark, so spreadsheets read it as UTF-8, and replaces anything already at the target.
These routes sit under AppDeviceBridgePolicies.Bridges like every other bridge: callers on this device by default.
See Security.
The bridge can write: it is a database client, and query runs UPDATE, DELETE and DDL. It can’t leave the file it
opened. SQLite’s authorizer runs while each statement is prepared and refuses ATTACH, which also covers VACUUM INTO,
and load_extension. A query can’t open a file outside the file roots or load native code. The query history is
outside every root, so the page reaches it only through these routes.
A connection served by a driver is reached by its id alone. Whatever it needs to connect stays in the app, with the
driver.