HandlerSocketClient: Haskell implementation of a HandlerSocket client (API).

[ bsd3, database, deprecated, library ] [ Propose Tags ] [ Report a vulnerability ]
Deprecated

This package implemets API for a HandlerSocket client.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5
Dependencies base (>3 && <5), bytestring, network [details]
License BSD-3-Clause
Copyright 2011 Wu Xingbo (wuxb45@gmail.com)
Author Wu Xingbo
Maintainer Wu Xingbo
Category Database
Home page https://github.com/wuxb45/HandlerSocket-Haskell-Client
Bug tracker mailto:wuxb45@gmail.com
Uploaded by XingboWu at 2012-02-20T10:11:53Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4802 total (13 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 HandlerSocketClient-0.0.5

[back to package description]
--
-- 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