eventstore-0.1.1.0: EventStore Haskell TCP Client

Copyright(C) 2014 Yorick Laupa
License(see the file LICENSE)
MaintainerYorick Laupa <yo.eight@gmail.com>
Stabilityprovisional
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Database.EventStore

Contents

Description

 

Synopsis

Documentation

data ExpectedVersion Source

Constructors

Any

Says that you should not conflict with anything

NoStream

Stream should not exist when doing your write

EmptyStream

Stream should exist but be empty when doing the write

type Port = Int Source

data Subscription Source

Constructors

Subscription 

Fields

subId :: !UUID
 
subStream :: !Text
 
subResolveLinkTos :: !Bool
 
subEventChan :: !(TChan (Either DropReason ResolvedEventBuf))
 
subLastCommitPos :: !Int64
 
subLastEventNumber :: !(Maybe Int32)
 
subUnsubscribe :: IO ()
 

Result

data AllEventsSlice Source

Constructors

AllEventsSlice 

Fields

allEventsSliceResult :: !ReadAllResult
 
allEventsSliceFrom :: !Position
 
allEventsSliceNext :: !Position
 
allEventsSliceIsEOS :: !Bool
 
allEventsSliceEvents :: ![ResolvedEvent]
 
allEventsSliceDirection :: !ReadDirection
 

Instances

newtype DeleteResult Source

Constructors

DeleteResult 

Fields

deleteStreamPosition :: Position
 

Instances

data WriteResult Source

Constructors

WriteResult 

Fields

writeNextExpectedVersion :: !Int32
 
writePosition :: !Position
 

Instances

data ReadResult Source

Constructors

ReadResult 

Fields

readResultStatus :: !ReadEventResult
 
readResultStreamId :: !Text
 
readResultEventNumber :: !Int32
 
readResultResolvedEvent :: !(Maybe ResolvedEvent)
 

Instances

eventResolved :: ResolvedEvent -> Bool Source

Event

Connection manager

connect :: Settings -> HostName -> Port -> IO Connection Source

Creates a new connection to a single node. It maintains a full duplex connection to the EventStore. An EventStore Connection operates quite differently than say a SQL connection. Normally when you use a SQL connection you want to keep the connection open for a much longer of time than when you use a SQL connection.

Another difference is that with the EventStore Connection all operation are handled in a full async manner (even if you call the synchronous behaviors). Many threads can use an EvenStore connection at the same time or a single thread can make many asynchronous requests. To get the most performance out of the connection it is generally recommend to use it in this way

Transaction

Re-export