Document 'Limit and offset'
commit55fef874e3c6568c01826ab206bb3bf5d20212e1
authorOllie Charles <ollie@ocharles.org.uk>
dateSun 11 Apr 2021, 12:28 (6 years ago)
parente1ea597
docs/concepts/queries.rst+7−2
@@ -108,9 +108,14 @@ with a ``TableSchema``.
108108Limit and offset
109109----------------
110110
111−.. todo::
111+The SQL ``LIMIT`` and ``OFFSET`` keywords are available in Rel8 as ``limit``
112+and ``offset``. Note that, like SQL, the order of these operations matters.
113+Usually, the correct thing to do is to first apply an offset with ``offset``,
114+and then use ``limit`` to limit the number of rows returned::
112115
113− Write this
116+ limit n . offset m . orderBy anOrdering
117+
118+These operations are similar to Haskell's ``take`` and ``drop`` operations.
114119
115120Filtering queries
116121-----------------