erpnext-api-client-0.2.0.0: Generic API client library for ERPNext
Safe HaskellSafe-Inferred
LanguageGHC2021

ERPNext.Client.Filters

Synopsis

Documentation

type Fieldname = Text Source #

Type for field names of DocTypes.

renderFilters :: [Filter] -> Text Source #

Render the filter terms for the URL query string.

>>> urlDecode $ renderFilters [Eq (pack "idx") (FilterNumber 99)]
"[[\"idx\",\"=\",99.0]]"
>>> urlDecode $ renderFilters [IsNull (pack "status"), In (pack "name") [FilterText (pack "a"), FilterText (pack "b")]]
"[[\"status\",\"is\",\"not set\"],[\"name\",\"in\",[\"a\",\"b\"]]]"