Stability | Experimental |
---|---|
Maintainer | travis.brady@gmail.com |
A pure Haskell interface to the Tokyo Tyrant database server
- data TyrantOption
- openConnection :: HostName -> ServiceName -> IO Socket
- closeConnection :: Socket -> IO ()
- putValue :: Socket -> ByteString -> ByteString -> IO (Either String String)
- getValue :: Socket -> ByteString -> IO (Either String ByteString)
- getDouble :: Socket -> ByteString -> IO (Either [Char] Double)
- putDouble :: Socket -> ByteString -> Double -> IO (Either [Char] Double)
- getInt :: Socket -> ByteString -> IO (Either [Char] Int)
- putInt :: Socket -> ByteString -> Int -> IO (Either [Char] Int)
- putKeep :: Socket -> ByteString -> ByteString -> IO (Either String String)
- putCat :: Socket -> ByteString -> ByteString -> IO (Either String String)
- out :: Socket -> ByteString -> IO (Either String String)
- vsiz :: Socket -> ByteString -> IO (Either [Char] Int)
- mget :: Socket -> [ByteString] -> IO (Either [Char] [(ByteString, ByteString)])
- vanish :: Socket -> IO (Either String String)
- sync :: Socket -> IO (Either String String)
- copy :: Socket -> ByteString -> IO (Either String String)
- addInt :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] Int)
- size :: Socket -> IO (Either [Char] Int)
- rnum :: Socket -> IO (Either [Char] Int)
- stat :: Socket -> IO (Either [Char] [[ByteString]])
- restore :: Integral a => Socket -> ByteString -> a -> IO (Either String String)
- setmst :: Integral a => Socket -> ByteString -> a -> IO (Either String String)
- addDouble :: RealFrac b => Socket -> ByteString -> b -> IO (Either String Double)
- putshl :: Integral a => Socket -> ByteString -> ByteString -> a -> IO (Either String String)
- putnr :: Socket -> ByteString -> ByteString -> IO ()
- iterinit :: Socket -> IO (Either String String)
- iternext :: Socket -> IO (Either [Char] ByteString)
- fwmkeys :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] [ByteString])
- ext :: Socket -> ByteString -> ByteString -> ByteString -> [TyrantOption] -> IO (Either [Char] ByteString)
- misc :: Socket -> ByteString -> [ByteString] -> [TyrantOption] -> IO (Either [Char] [ByteString])
Documentation
openConnection :: HostName -> ServiceName -> IO SocketSource
Connect to Tokyo Tyrant
closeConnection :: Socket -> IO ()Source
Close connection to ttserver
putValue :: Socket -> ByteString -> ByteString -> IO (Either String String)Source
Store a record
getValue :: Socket -> ByteString -> IO (Either String ByteString)Source
Retrieve a record
putDouble :: Socket -> ByteString -> Double -> IO (Either [Char] Double)Source
Store a record where the value is a double
putInt :: Socket -> ByteString -> Int -> IO (Either [Char] Int)Source
Store a record with an Int value
putKeep :: Socket -> ByteString -> ByteString -> IO (Either String String)Source
Store a new record If key already exists nothing is done
putCat :: Socket -> ByteString -> ByteString -> IO (Either String String)Source
Concatenate a value at the end of the existing record
mget :: Socket -> [ByteString] -> IO (Either [Char] [(ByteString, ByteString)])Source
Fetch keys and values for multiple records
sync :: Socket -> IO (Either String String)Source
Synchronize updated contents with the database file
copy :: Socket -> ByteString -> IO (Either String String)Source
Copy the database file to the specified path
addInt :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] Int)Source
Add an integer to a record
restore :: Integral a => Socket -> ByteString -> a -> IO (Either String String)Source
Restore the database with update log
:: Integral a | |
=> Socket | Connection |
-> ByteString | key |
-> ByteString | value |
-> a | width |
-> IO (Either String String) |
concatenate a value at the end of the existing record and shift it to the lef
putnr :: Socket -> ByteString -> ByteString -> IO ()Source
store a record into a remote database object without response from the server
iterinit :: Socket -> IO (Either String String)Source
initialize the iterator of a remote database object
iternext :: Socket -> IO (Either [Char] ByteString)Source
get the next key of the iterator of a remote database object
fwmkeys :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] [ByteString])Source
get forward matching keys in a remote database object
:: Socket | Connection to Tokyo Tyrant |
-> ByteString | the lua function to be called |
-> ByteString | specifies the key |
-> ByteString | specified the value |
-> [TyrantOption] | locking and update log options |
-> IO (Either [Char] ByteString) |
Call a function of the script language extension
:: Socket | Connection to Tokyo Tyrant |
-> ByteString | funcname |
-> [ByteString] | args |
-> [TyrantOption] | options |
-> IO (Either [Char] [ByteString]) |