franz-0.5.3: Append-only database
Safe HaskellNone
LanguageHaskell2010

Database.Franz.Writer

Synopsis

Writer interface

data WriterHandle (f :: Type -> Type) Source #

Instances

Instances details
NFData (WriterHandle f) Source # 
Instance details

Defined in Database.Franz.Writer

Methods

rnf :: WriterHandle f -> () #

openWriter Source #

Arguments

:: Foldable f 
=> f String

index names: a fixed-length collection of the names of indices for this stream. Use Proxy if you don't want any indices. If you want only one type of index, use `Identity ""`.

-> FilePath 
-> IO (WriterHandle f) 

closeWriter :: WriterHandle f -> IO () Source #

Flush any pending data and close a WriterHandle.

withWriter :: Foldable f => f String -> FilePath -> (WriterHandle f -> IO a) -> IO a Source #

write Source #

Arguments

:: Foldable f 
=> WriterHandle f 
-> f Int64

index values

-> Builder

payload

-> IO Int 

flush :: WriterHandle f -> IO () Source #

Flush the changes.

getLastSeqNo :: WriterHandle f -> IO Int Source #

Get the sequential number of the last item item written.