View Source Rivet.Utils.Criteria (rivet_utils v2.0.5)

Criteria is used for cursor based pagination.

Contributor: Brandon Gillespie

Summary

Functions

Function to apply the limit to the query (optional)

Function to apply the offset to the query (optional)

Function to order the collection by attribute and direction

Take out the :criteria item from the arguments Returns something like

Functions

Function to apply the limit to the query (optional)

Link to this function

limit(query, arg2, limit)

View Source

Function to apply the offset to the query (optional)

Link to this function

offset(query, arg2, offset)

View Source

Function to order the collection by attribute and direction

Link to this function

take(options \\ [], fun \\ fn -> ordering_by(nil) end)

View Source

Take out the :criteria item from the arguments Returns something like:

{:ok, %{limit: 500, offset: 1, sort: {"taskTitle", :asc}}}