HandlerSocketClient

Haskell implementation of a HandlerSocket client (API). https://github.com/wuxb45/HandlerSocket-Haskell-Client

Latest on Hackage:0.0.5

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed and maintained by Wu Xingbo
--
-- 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


Depends on:
Used by 1 package:
comments powered byDisqus