| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Orchestrate.Ref
Description
This module implements the Orchestrate Refs API.
Refs represent the immutable values that have been associated with a key.
- getRef :: FromJSON r => Collection -> Key -> Ref -> OrchestrateIO (Maybe r)
- listRefs :: FromJSON v => Collection -> Key -> Maybe Int -> Maybe Int -> Bool -> OrchestrateIO (ResultList (TombstoneItem v))
Documentation
getRef :: FromJSON r => Collection -> Key -> Ref -> OrchestrateIO (Maybe r) Source
This retrieves a ref associated with some data.
getRef "coll-name" "key" "43214321"
Arguments
| :: FromJSON v | |
| => Collection | This is the collection for the data. |
| -> Key | This is the key for the data. |
| -> Maybe Int | The maximum number of items to return. |
| -> Maybe Int | The offset into the total sequence of values. |
| -> Bool | Should the values be returned also, or just the |
| -> OrchestrateIO (ResultList (TombstoneItem v)) | Returns the list of results. |
This lists all the values that have been associated with a key in the database. Values are returned last to first.
listRefs "coll-name" "key" Nothing Nothing False