diff --git a/docs/python-api.rst b/docs/python-api.rst index 064b108..47cb30b 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -1394,6 +1394,10 @@ You can drop a table or view using the ``.drop()`` method: .. code-block:: python db.table("my_table").drop() + # Or for a view: + db.view("my_view").drop() + # Or for either: + db["table_or_view_name"].drop() Pass ``ignore=True`` if you want to ignore the error caused by the table or view not existing. @@ -1937,6 +1941,8 @@ If you have loaded an existing table or view, you can use introspection to find >>> db.table("PlantType") + ### db.view("NameOfView") + .. _python_api_introspection_exists: @@ -1949,6 +1955,8 @@ The ``.exists()`` method can be used to find out if a table exists or not:: True >>> db.table("PlantType2").exists() False + >>> db["table_or_view_name"].exists() + False .. _python_api_introspection_count: