The HandlerSocketClient package

[Tags: bsd3, library]

This package implemets API for a HandlerSocket client.


[Skip to ReadMe]

Properties

Versions0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5
Change logNone available
Dependenciesbase (>3 && <5), bytestring, network [details]
LicenseBSD3
Copyright2011 Wu Xingbo (wuxb45@gmail.com)
AuthorWu Xingbo
MaintainerWu Xingbo
CategoryDatabase
Home pagehttps://github.com/wuxb45/HandlerSocket-Haskell-Client
Bug trackermailto:wuxb45@gmail.com
UploadedMon Feb 20 10:11:53 UTC 2012 by XingboWu
DistributionsNixOS:0.0.5
Downloads988 total (42 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for HandlerSocketClient-0.0.5

--
-- Module : HSClient
-- Author : Wu Xingbo
-- Copyright (c) 2011 Wu Xingbo (wuxb45@gmail.com)
-- New BSD License
--
-- |
-- Haskell implementation of a HandlerSocket client (API).
-- HandlerSocket is a MySQL plugin with better performance then SQL.
-- HandlerSocket site: https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL
--
-- this module is now available in Hackage.
-- To install:
-- $ cabal install HandlerSocketClient

-- here is a piece of sample code to use Client API

main :: IO ()
main = do
  hs <- connectTo "127.0.0.1" "9999"
  r1 <- runReqOpen hs "test" "t1" "PRIMARY" "k,v"
  putStrLn $ show r1
  r2 <- runReqFind hs ">" "1" 100
  putStrLn $ show r2
  r3 <- runReqInsert hs ["99", "77"]
  putStrLn $ show r3
  r4 <- runReqUpdate hs "99" ["101", "77"]
  putStrLn $ show r4
  r5 <- runReqDelete hs "101"
  putStrLn $ show r5
  r6 <- runReqGeneric hs ["0","+","2","555","999"]
  putStrLn $ show r6
  r7 <- runReqFindN hs "=" ["1","2","3","4"] 1
  putStrLn $ show r7