| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Database.Bolty.Message.Response
Description
Internal module. Not part of the public API.
Synopsis
- data Response
- data Failure = Failure {}
- data SuccessHello = SuccessHello {}
- data SuccessRun
- successFields :: SuccessRun -> Vector Text
- successTFirst :: SuccessRun -> Int64
- data SuccessRunAutoCommitTransaction = SuccessRunAutoCommitTransaction {}
- data SuccessRunExplicitTransaction = SuccessRunExplicitTransaction {}
- makeResponseRunAutoCommitTransaction :: HashMap Text Ps -> Either Text SuccessRun
- data SuccessDiscard
- data SuccessDiscardLast = SuccessDiscardLast {}
- data SuccessPull = SuccessPull {}
- data QueryMeta = QueryMeta {
- bookmark :: !(Maybe Text)
- t_last :: !Int64
- type_ :: !Text
- stats :: !(Maybe Ps)
- parsedStats :: !(Maybe QueryStats)
- plan :: !(Maybe Ps)
- profile :: !(Maybe Ps)
- notifications :: !(Maybe Ps)
- parsedNotifications :: !(Vector Notification)
- parsedPlan :: !(Maybe PlanNode)
- parsedProfile :: !(Maybe ProfileNode)
- db :: !Text
- makeSuccessPull :: Vector Record -> HashMap Text Ps -> Either Text SuccessPull
- mapToSuccessPull :: Vector Record -> HashMap Text Ps -> Result SuccessPull
- data SuccessCommit = SuccessCommit {}
- data RoutingTable = RoutingTable {}
- parseRoutingTable :: HashMap Text Ps -> Either Text RoutingTable
- extractBookmark :: HashMap Text Ps -> Maybe Text
Documentation
A BOLT server response message.
the server always responds with one summary message if the connection is still open the server always responds with zero or more detail messages before sending a summary message
Constructors
A server-reported failure with a Neo4j error code and human-readable message.
data SuccessRun Source #
Parsed RUN SUCCESS metadata, either auto-commit or explicit transaction.
successFields :: SuccessRun -> Vector Text Source #
Extract the result field names from a SuccessRun.
successTFirst :: SuccessRun -> Int64 Source #
Extract the t_first timing value from a SuccessRun.
data SuccessRunAutoCommitTransaction Source #
RUN SUCCESS metadata for an auto-commit transaction.
Constructors
| SuccessRunAutoCommitTransaction | |
data SuccessRunExplicitTransaction Source #
RUN SUCCESS metadata for an explicit transaction.
Constructors
| SuccessRunExplicitTransaction | |
Fields
| |
makeResponseRunAutoCommitTransaction :: HashMap Text Ps -> Either Text SuccessRun Source #
Parse a RUN SUCCESS response for an auto-commit transaction.
data SuccessDiscard Source #
Parsed DISCARD SUCCESS response.
Constructors
| DiscardMore | |
| DiscardLast SuccessDiscardLast |
data SuccessDiscardLast Source #
Final DISCARD SUCCESS metadata with bookmark and database.
Constructors
| SuccessDiscardLast | |
Server metadata from a PULL SUCCESS response.
Constructors
| QueryMeta | |
Fields
| |
makeSuccessPull :: Vector Record -> HashMap Text Ps -> Either Text SuccessPull Source #
Build a SuccessPull from collected records and PULL SUCCESS metadata (Either version).
mapToSuccessPull :: Vector Record -> HashMap Text Ps -> Result SuccessPull Source #
Build a SuccessPull from collected records and PULL SUCCESS metadata (Result version).
data RoutingTable Source #
A parsed routing table returned by the ROUTE message.
Constructors
| RoutingTable | |
Instances
| Show RoutingTable Source # | |
Defined in Database.Bolty.Message.Response Methods showsPrec :: Int -> RoutingTable -> ShowS # show :: RoutingTable -> String # showList :: [RoutingTable] -> ShowS # | |
| Eq RoutingTable Source # | |
Defined in Database.Bolty.Message.Response | |
parseRoutingTable :: HashMap Text Ps -> Either Text RoutingTable Source #
Parse a routing table from the SUCCESS response metadata of a ROUTE message.
The expected wire format is:
{"rt": {"ttl": N, "db": "name", "servers": [{"addresses": [...], "role": WRITE}, ...]}}