INNER CODE UNIT · Python
view
evangelosmeklis/peepdb · peepdb/cli.py:133
def view(connection_name, table, format, page, page_size, scientific):
"""
View data from a saved connection.
Example:
peepdb view mydb --table SomeTable
"""
try:
connection = get_connection(connection_name)
except InvalidPassword:
click.echo("Error: Unable to decrypt saved connection. Invalid password provided.")
raise SystemExit(1)
if not connection:
click.echo(f"Error: No saved connection found with name '{connection_name}'.")
return
# If there's a sixth item, it's 'trusted'
if len(connection) == 6: