Skip to contents

Returns a lazy tibble of all schemas in the **current database** of the connection. Queries `information_schema.schemata` and filters to the current database (`catalog_name = current_database()`).

Usage

list_schemas(.con)

Arguments

.con

A valid `DBI` connection (DuckDB / MotherDuck).

Value

A `dbplyr` lazy tibble with columns: * `catalog_name` — the current database name. * `schema_name` — each schema within that database.

Details

- This function assumes the connection is valid (checked with `validate_con()`). - Returns a `dbplyr` lazy table; use `collect()` to bring the result into R.

See also

[dbplyr::tbl()], [DBI::dbConnect()]