Skip to contents

Drops (deletes) a specified share from your MotherDuck account. If the share does not exist, a warning is displayed. This function safely validates the connection and share name before executing the operation.

Usage

drop_share(.con, share_name)

Arguments

.con

A valid DBI connection (DuckDB / MotherDuck).

share_name

Character. The name of the share to be dropped.

Value

Invisibly returns NULL. Side effect: the specified share is removed if it exists.

Details

The function first validates that the connection is active. It then checks whether the specified share exists in the account. If it does, the share is dropped using a DROP SHARE IF EXISTS SQL command. If the share does not exist, a warning is shown. After the operation, the current user is displayed.

Examples

if (FALSE) { # \dontrun{
drop_share(con_md, "test_share")
} # }