Revamp the documentation

This commit is contained in:
Friedrich Lindenberg
2020-12-30 22:16:10 +01:00
parent 02d3d0333f
commit 8325f855af
19 changed files with 104 additions and 997 deletions
+10 -4
View File
@@ -486,9 +486,12 @@ class Table(object):
self.create_column(name, type_)
def drop_column(self, name):
"""Drop the column ``name``.
"""
Drop the column ``name``.
::
table.drop_column('created_at')
"""
if self.db.engine.dialect.name == "sqlite":
raise RuntimeError("SQLite does not support dropping columns.")
@@ -589,9 +592,12 @@ class Table(object):
# return all rows sorted by multiple columns (descending by year)
results = table.find(order_by=['country', '-year'])
To perform complex queries with advanced filters or to perform
aggregation, use :py:meth:`db.query() <dataset.Database.query>`
instead.
You can also submit filters based on criteria other than equality,
see :ref:`advanced_filters` for details.
To run more complex queries with JOINs, or to perform GROUP BY-style
aggregation, you can also use :py:meth:`db.query() <dataset.Database.query>`
to run raw SQL queries instead.
"""
if not self.exists:
return iter([])