# sqlite/columns-async
Async twin of `sqlite/columns` — fetch column metadata for a table off-thread via `PRAGMA table_info`. Returns a Future of row maps.
## Syntax
[sqlite/columns-async $db $table]
## Parameters
- `$db` — database handle
- `$table` — table name (alphanumeric and `_` only; anything else is rejected)
## Examples
def db [sqlite/open ":memory:"] [sqlite/exec $db "CREATE TABLE t (zebra INTEGER, alpha TEXT)"] set cols [await [sqlite/columns-async $db "t"]] echo [nth $cols 0]~name # → zebra echo [nth $cols 0]~type # → INTEGER
## Returns
Future; `[await ...]` yields the `PRAGMA table_info` rows as maps with fields `:cid`, `:name`, `:type`, `:notnull`, `:dflt_value`, `:pk`. Worker errors resolve as `%Err{:message}`; submit-time errors (bad handle, non-string or invalid table name) 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/columns`, `sqlite/tables-async`