-- | This module exports the types used to create read queries.moduleData.Factual.Query.ReadQuery(-- * ReadQuery typeReadQuery(..)-- * Required modules,moduleData.Factual.Shared.Table,moduleData.Factual.Shared.Search,moduleData.Factual.Shared.SortOrder,moduleData.Factual.Shared.Filter,moduleData.Factual.Shared.Geo)whereimportData.Factual.QueryimportData.Factual.Shared.TableimportData.Factual.Shared.SearchimportData.Factual.Shared.SortOrderimportData.Factual.Shared.FilterimportData.Factual.Shared.GeoimportData.Factual.UtilsimportqualifiedData.MapasM-- | The ReadQuery type is used to construct read queries. A table should be-- specified, but the rest of the query options are essentially optional-- (you opt out using Nothing or an empty List for the value). The select is-- a list of field names to include in the results. The limit and offset are-- used to request a specific range of rows and includeCount will include the-- count of returned rows if it is set to True.dataReadQuery=ReadQuery{table::Table,search::Search,select::[String],limit::MaybeInt,offset::MaybeInt,filters::[Filter],geo::MaybeGeo,sort::[SortOrder],includeCount::Bool}deriving(Eq,Show)-- The ReadQuery type is a member of the Query typeclass so it can be used to-- make a request.instanceQueryReadQuerywherepathquery=show$tablequeryparamsquery=M.fromList[searchPair$searchquery,selectPair$selectquery,limitPair$limitquery,offsetPair$offsetquery,filtersPair$filtersquery,geoPair$geoquery,sortPair$sortquery,includeCountPair$includeCountquery]-- The following helper functions are used in generating query Strings.offsetPair::MaybeInt->(String,String)offsetPair(Justx)=("offset",showx)offsetPairNothing=("offset","")