Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Full API
:members:


.. autoclass:: multicorn.SortKey

.. autoclass:: multicorn.Qual
:members:

Expand Down
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sphinx
sphinxcontrib-napoleon
mock
sqlalchemy
funcsigs
18 changes: 18 additions & 0 deletions python/multicorn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@
["attname", "attnum", "is_reversed",
"nulls_first", "collate"])

"""
A SortKey describes the sort of one column an SQL query requested.

A query can request the sort of zero, one or multiple columns. Therefore, a list
of SortKey is provided to the ForeignDataWrapper, containing zero, one or more
SortKey.

Attributes:
attname(str): The name of the column to sort as defined in the postgresql
table.
attnum(int): The position of the column to sort as defined in the
postgresql table.
is_reversed(bool): True is the query requested a DESC order.
nulls_first(bool): If True, NULL values must appears at the beginning.
Otherwise, they must appear at the end.
collate(str): The collation name to use to sort the data, as appearing
in the postgresql cluster.
"""

class Qual(object):
"""A Qual describes a postgresql qualifier.
Expand Down