wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.MultiTablePaging

Synopsis

Documentation

data GetMultiTablePageRequest (name :: Symbol) (tables :: Type) (max :: Nat) (def :: Nat) Source #

A request for a page of results from the database. Type arguments:

  • name Name of the resources being paginated through
  • tables A (usually finite) type that represent the table currently being used (must be an instance of PagingTable)
  • max Maximum page size
  • def Default page size

See ConversationPagingState for an example.

Constructors

GetMultiTablePageRequest 

Fields

Instances

Instances details
RequestSchemaConstraint name tables max def => FromJSON (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

parseJSON :: Value -> Parser (GetMultiTablePageRequest name tables max def) Source #

parseJSONList :: Value -> Parser [GetMultiTablePageRequest name tables max def] Source #

RequestSchemaConstraint name tables max def => ToJSON (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

toJSON :: GetMultiTablePageRequest name tables max def -> Value Source #

toEncoding :: GetMultiTablePageRequest name tables max def -> Encoding Source #

toJSONList :: [GetMultiTablePageRequest name tables max def] -> Value Source #

toEncodingList :: [GetMultiTablePageRequest name tables max def] -> Encoding Source #

Show tables => Show (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

showsPrec :: Int -> GetMultiTablePageRequest name tables max def -> ShowS #

show :: GetMultiTablePageRequest name tables max def -> String #

showList :: [GetMultiTablePageRequest name tables max def] -> ShowS #

Eq tables => Eq (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

(==) :: GetMultiTablePageRequest name tables max def -> GetMultiTablePageRequest name tables max def -> Bool #

(/=) :: GetMultiTablePageRequest name tables max def -> GetMultiTablePageRequest name tables max def -> Bool #

(Typeable tables, RequestSchemaConstraint name tables max def) => ToSchema (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

RequestSchemaConstraint name tables max def => ToSchema (GetMultiTablePageRequest name tables max def) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

data MultiTablePage (name :: Symbol) (resultsKey :: Symbol) (tables :: Type) a Source #

The result of a multi-table paginated query. Contains the list of results, a flag indicating whether there are more, and the state to pass to the next query.

Constructors

MultiTablePage 

Instances

Instances details
PageSchemaConstraints name resultsKey tables a => FromJSON (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

parseJSON :: Value -> Parser (MultiTablePage name resultsKey tables a) Source #

parseJSONList :: Value -> Parser [MultiTablePage name resultsKey tables a] Source #

PageSchemaConstraints name resultsKey tables a => ToJSON (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

toJSON :: MultiTablePage name resultsKey tables a -> Value Source #

toEncoding :: MultiTablePage name resultsKey tables a -> Encoding Source #

toJSONList :: [MultiTablePage name resultsKey tables a] -> Value Source #

toEncodingList :: [MultiTablePage name resultsKey tables a] -> Encoding Source #

(Show a, Show tables) => Show (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

showsPrec :: Int -> MultiTablePage name resultsKey tables a -> ShowS #

show :: MultiTablePage name resultsKey tables a -> String #

showList :: [MultiTablePage name resultsKey tables a] -> ShowS #

(Eq a, Eq tables) => Eq (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

(==) :: MultiTablePage name resultsKey tables a -> MultiTablePage name resultsKey tables a -> Bool #

(/=) :: MultiTablePage name resultsKey tables a -> MultiTablePage name resultsKey tables a -> Bool #

(Typeable tables, Typeable a, PageSchemaConstraints name resultsKey tables a) => ToSchema (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

(KnownSymbol resultsKey, KnownSymbol name, ToSchema a, PagingTable tables) => ToSchema (MultiTablePage name resultsKey tables a) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging

Methods

schema :: ValueSchema NamedSwaggerDoc (MultiTablePage name resultsKey tables a) Source #

data LocalOrRemoteTable Source #

A type to be used as the tables argument of GetMultiTablePageRequest when the resources being paginated through are split into local and remote.

data MultiTablePagingState (name :: Symbol) tables Source #

The state of a multi-table paginated query. It is made of a reference to the table currently being paginated, as well as an opaque token returned by Cassandra.

Constructors

MultiTablePagingState 

Fields

Instances

Instances details
ToParamSchema TeamMembersPagingState Source # 
Instance details

Defined in Wire.API.Team.Member

(PagingTable tables, KnownSymbol name) => FromJSON (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

(PagingTable tables, KnownSymbol name) => ToJSON (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

Show tables => Show (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

Methods

showsPrec :: Int -> MultiTablePagingState name tables -> ShowS #

show :: MultiTablePagingState name tables -> String #

showList :: [MultiTablePagingState name tables] -> ShowS #

Eq tables => Eq (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

Methods

(==) :: MultiTablePagingState name tables -> MultiTablePagingState name tables -> Bool #

(/=) :: MultiTablePagingState name tables -> MultiTablePagingState name tables -> Bool #

PagingTable tables => FromHttpApiData (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

PagingTable tables => ToHttpApiData (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

(KnownSymbol name, Typeable tables, PagingTable tables) => ToSchema (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State

(PagingTable tables, KnownSymbol name) => ToSchema (MultiTablePagingState name tables) Source # 
Instance details

Defined in Wire.API.Routes.MultiTablePaging.State