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
- data HandSock = HandSock {}
- connectTo :: String -> String -> Int -> IO HandSock
- closeHS :: HandSock -> IO ()
- runReqNoRespData :: HandSock -> [String] -> IO Bool
- runReqGeneric :: HandSock -> [String] -> IO [String]
- runReqOpen :: HandSock -> String -> String -> String -> String -> IO Bool
- runReqFind :: Integral a => HandSock -> String -> String -> a -> IO [[String]]
- runReqInsert :: HandSock -> [String] -> IO Bool
- runReqUpdate :: HandSock -> String -> [String] -> IO Bool
- runReqDelete :: HandSock -> String -> IO Bool
Basic Type
basic data structure for one Socket
and one Handle (or Index).
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.
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.