# sqlite/query-one-async
Async twin of `sqlite/query-one` — fetch the first matching row off-thread. Returns a Future of a row map or `nil`.
## Syntax
[sqlite/query-one-async $db $sql ?params...]
## Parameters
- `$db` — database handle
- `$sql` — SELECT query
- `?params...` — optional bind values, as separate args or a single `@{}` vector
## Examples
def db [sqlite/open ":memory:"] [sqlite/exec $db "CREATE TABLE t (id INTEGER, name TEXT)"] [sqlite/exec $db "INSERT INTO t VALUES (1, 'alice')"] [await [sqlite/query-one-async $db "SELECT name FROM t WHERE id = ?" @{1}]] # → %{:name alice} [await [sqlite/query-one-async $db "SELECT name FROM t WHERE id = ?" @{99}]] # → nil
## Returns
Future; `[await ...]` yields the first row as a `%{:col value}` map, or `nil` when no row matches (or on a step with no row). Worker errors resolve as `%Err{:message}`; submit-time errors (bad handle, non-string SQL) return `%Err` directly. The first async call switches the handle to async-only, so later sync `sqlite/*` calls on it return `%Err`. `sqlite/close` drains queued jobs before closing.
## See Also
`sqlite/query-one`, `sqlite/query-async`, `sqlite/scalar-async`