haskell-tyrant: Haskell implementation of the Tokyo Tyrant binary protocol

[ bsd3, database, library ] [ Propose Tags ]

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.net/tyrantdoc/


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.4
Dependencies base, binary, bytestring, network, network-bytestring [details]
License BSD-3-Clause
Author Travis Brady <travis.brady@gmail.com>
Maintainer Travis Brady <travis.brady@gmail.com>
Category Database
Home page http://github.com/travisbrady
Uploaded by TravisBrady at 2009-03-23T03:13:11Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2558 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for haskell-tyrant-0.1

[back to package description]

Pure Haskell interface to Tokyo Tyrant

haskell-tyrant lets you connect to ttserver

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