Learn R Programming

motherduck (version 0.2.0)

list_owned_shares: List all shares owned by the current user

Description

Retrieves all database objects that are owned by the current authenticated user in MotherDuck.

Usage

list_owned_shares(.con)

Value

A tibble with one row per share owned by the current user, including columns for share name, object type, and granted privileges.

Arguments

.con

A valid DBI connection (DuckDB / MotherDuck).

Details

This function executes the LIST SHARES; command to return metadata about all shares created by the current user. The returned tibble includes details such as the share name, type of object shared, and privileges granted.

See Also

Other db-manage: alter_table_schema(), copy_tables_to_new_location(), create_database(), create_if_not_exists_share(), create_or_replace_share(), create_schema(), create_table(), delete_and_create_schema(), delete_database(), delete_schema(), delete_table(), describe_share(), drop_share(), list_shared_with_me_shares(), upload_database_to_md()

Examples

Run this code
if (FALSE) {
con <- DBI::dbConnect(duckdb::duckdb(dbdir = tempfile()))
owned_tbl <- list_owned_shares(con)
print(owned_tbl)
}

Run the code above in your browser using DataLab