Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data GetMultiTablePageRequest (name :: Symbol) (tables :: Type) (max :: Nat) (def :: Nat) = GetMultiTablePageRequest {
- gmtprSize :: Range 1 max Int32
- gmtprState :: Maybe (MultiTablePagingState name tables)
- data MultiTablePage (name :: Symbol) (resultsKey :: Symbol) (tables :: Type) a = MultiTablePage {
- mtpResults :: [a]
- mtpHasMore :: Bool
- mtpPagingState :: MultiTablePagingState name tables
- data LocalOrRemoteTable
- data MultiTablePagingState (name :: Symbol) tables = MultiTablePagingState {
- mtpsTable :: tables
- mtpsState :: Maybe ByteString
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 throughtables
A (usually finite) type that represent the table currently being used (must be an instance ofPagingTable
)max
Maximum page sizedef
Default page size
See ConversationPagingState
for an example.
GetMultiTablePageRequest | |
|
Instances
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.
MultiTablePage | |
|
Instances
PageSchemaConstraints name resultsKey tables a => FromJSON (MultiTablePage name resultsKey tables a) Source # | |
Defined in Wire.API.Routes.MultiTablePaging 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 # | |
Defined in Wire.API.Routes.MultiTablePaging 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 # | |
Defined in Wire.API.Routes.MultiTablePaging 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 # | |
Defined in Wire.API.Routes.MultiTablePaging (==) :: 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 # | |
Defined in Wire.API.Routes.MultiTablePaging declareNamedSchema :: Proxy (MultiTablePage name resultsKey tables a) -> Declare (Definitions Schema) NamedSchema Source # | |
(KnownSymbol resultsKey, KnownSymbol name, ToSchema a, PagingTable tables) => ToSchema (MultiTablePage name resultsKey tables a) Source # | |
Defined in Wire.API.Routes.MultiTablePaging 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.
Instances
Show LocalOrRemoteTable Source # | |
Defined in Wire.API.Routes.MultiTablePaging showsPrec :: Int -> LocalOrRemoteTable -> ShowS # show :: LocalOrRemoteTable -> String # showList :: [LocalOrRemoteTable] -> ShowS # | |
Eq LocalOrRemoteTable Source # | |
Defined in Wire.API.Routes.MultiTablePaging (==) :: LocalOrRemoteTable -> LocalOrRemoteTable -> Bool # (/=) :: LocalOrRemoteTable -> LocalOrRemoteTable -> Bool # | |
PagingTable LocalOrRemoteTable Source # | |
Defined in Wire.API.Routes.MultiTablePaging encodePagingTable :: LocalOrRemoteTable -> Word8 Source # decodePagingTable :: MonadFail m => Word8 -> m LocalOrRemoteTable Source # |
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.
MultiTablePagingState | |
|