# Using an existing connection
con <- connect_to_motherduck()
show_current_user(.con = con, return = "msg")Show current database user
Source: R/api.R
Return or print the current database user for a MotherDuck / DuckDB connection.
Usage
show_current_user(.con, return = "msg")Arguments
Value
a tibble
Details
This helper queries the active DB connection for the current user (via SELECT current_user).
The function supports two output modes:
-
“msg”— prints a small informative message and returns the result invisibly (useful for interactive use), -
“arg”— returns a tibble containing thecurrent_usercolumn.
See Also
Other db-api: configure_md_user_settings(), create_md_access_token(), create_md_user(), delete_md_access_token(), delete_md_user(), list_md_active_accounts(), list_md_user_instance(), list_md_user_tokens()