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

Database.HandlerSocket.HSClient

Contents

Description

Haskell implementation of a HandlerSocket client (API). HandlerSocket is a MySQL plugin with better performance then SQL. HandlerSocket site: https:github.comahigutiHandlerSocket-Plugin-for-MySQL

Synopsis

Basic Type

data HandSock Source

basic data structure for one Socket and one Handle (or Index).

Constructors

HandSock 

Fields

getSocket :: Socket
 
getHandle :: Int
 

Connection

connectTo :: String -> String -> Int -> IO HandSockSource

Connect to specific address & port with a given handle-id (or index). Returns the HandSock for later request or close.

closeHS :: HandSock -> IO ()Source

Close the connection.

Do Generic Request

runReqNoRespData :: HandSock -> [String] -> IO BoolSource

Do Generic Request with given Strings. Return True or False, discarding all other messages.

runReqGeneric :: HandSock -> [String] -> IO [String]Source

Do Generic Request, Returns all values received, "0" in the head means SUCCESS.

Do Special Request

runReqOpen :: HandSock -> String -> String -> String -> String -> IO BoolSource

Do 'open_index' request.

runReqFind :: Integral a => HandSock -> String -> String -> a -> IO [[String]]Source

Do 'find' request. Returns

runReqInsert :: HandSock -> [String] -> IO BoolSource

Do 'insert' request, insert one record at a time.

runReqUpdate :: HandSock -> String -> [String] -> IO BoolSource

Do 'update' request, give one value to be compared with the KEY, then provide the new data. Only ONE record will be updated.

runReqDelete :: HandSock -> String -> IO BoolSource

Do 'delete' request, give one value to be compared with the KEY. Only one record will be deleted.