The haskell-tyrant package

[Tags:bsd3, library]

A pure Haskell implementation of the Tokyo Tyrant binary protocol. Tokyo Tyrant is a database server for the Tokyo Cabinet database library. http:tokyocabinet.sourceforge.nettyrantdoc


[Skip to Readme]

Properties

Versions 0.1, 0.2, 0.4
Dependencies base (==4.*), binary, bytestring, network (>=2.3) [details]
License BSD3
Author Travis Brady <travis.brady@gmail.com>
Maintainer Peter Scott <peter@greplin.com>
Stability Unknown
Category Database
Home page https://github.com/PeterScott/haskell-tyrant
Uploaded Sat Jul 2 03:38:45 UTC 2011 by PeterScott
Distributions
Downloads 646 total (9 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for haskell-tyrant

Readme for haskell-tyrant-0.4

Pure Haskell interface to Tokyo Tyrant

Haskell-tyrant is a client library for Tokyo Tyrant. It uses the binary protocol for efficiency.

Example

A simple example assuming you've got ttserver running at the default location

module Main where

import Database.TokyoTyrant
import Data.ByteString.Lazy.Char8 (pack)

defaultHost = "localhost"
defaultPort = "1978"

main = do
    let k = pack "mykey"
    let v = pack "myval"
    conn <- openConnection defaultHost defaultPort
    result <- putValue conn k v
    --should be "success"
    print result
    g <- getValue conn k
    print g
    -- remove the record created above
    out conn k
    -- close connection to server
    closeConnection conn