Learn R Programming

motherduck (version 0.2.0)

list_shared_with_me_shares: List all shares shared with the current user

Description

Retrieves all database objects that have been shared with the current authenticated user in MotherDuck.

Usage

list_shared_with_me_shares(.con)

Value

A tibble containing one row per shared object, with columns describing the owner, object type, object name, and granted privileges.

Arguments

.con

A valid DBI connection (DuckDB / MotherDuck).

Details

This function queries the MD_INFORMATION_SCHEMA.SHARED_WITH_ME view to return metadata about all shares granted to the current user, including the owner, object name, type, and privileges. The result is returned as a tidy tibble for easy manipulation in R.

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_owned_shares(), upload_database_to_md()

Examples

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

Run the code above in your browser using DataLab