franz-0.2.1: Append-only database

Safe HaskellNone
LanguageHaskell2010

Database.Franz

Contents

Synopsis

Writer interface

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

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 :: Foldable f => 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.