-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell implementation of the Tokyo Tyrant binary protocol -- -- A pure Haskell implementation of the Tokyo Tyrant binary protocol. -- Tokyo Tyrant is a database server for the Tokyo Cabinet database -- library. http:tokyocabinet.sourceforge.nettyrantdoc @package haskell-tyrant @version 0.2 -- | A pure Haskell interface to the Tokyo Tyrant database server module Database.TokyoTyrant data TyrantOption RecordLocking :: TyrantOption GlobalLocking :: TyrantOption NoUpdateLog :: TyrantOption -- | Connect to Tokyo Tyrant openConnection :: HostName -> ServiceName -> IO Socket -- | Close connection to ttserver closeConnection :: Socket -> IO () -- | Store a record putValue :: Socket -> ByteString -> ByteString -> IO (Either String String) -- | Retrieve a record getValue :: Socket -> ByteString -> IO (Either String ByteString) getDouble :: Socket -> ByteString -> IO (Either [Char] Double) -- | Store a record where the value is a double putDouble :: Socket -> ByteString -> Double -> IO (Either [Char] Double) -- | Retrieve a record with an Int value getInt :: Socket -> ByteString -> IO (Either [Char] Int) -- | Store a record with an Int value putInt :: Socket -> ByteString -> Int -> IO (Either [Char] Int) -- | Store a new record If key already exists nothing is done putKeep :: Socket -> ByteString -> ByteString -> IO (Either String String) -- | Concatenate a value at the end of the existing record putCat :: Socket -> ByteString -> ByteString -> IO (Either String String) -- | Remove a record out :: Socket -> ByteString -> IO (Either String String) -- | Get the size of the value of a record vsiz :: Socket -> ByteString -> IO (Either [Char] Int) -- | Fetch keys and values for multiple records mget :: Socket -> [ByteString] -> IO (Either [Char] [(ByteString, ByteString)]) -- | Remove all records vanish :: Socket -> IO (Either String String) -- | Synchronize updated contents with the database file sync :: Socket -> IO (Either String String) -- | Copy the database file to the specified path copy :: Socket -> ByteString -> IO (Either String String) -- | Add an integer to a record addInt :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] Int) -- | Get the size of the database size :: Socket -> IO (Either [Char] Int) -- | Get the number of records rnum :: Socket -> IO (Either [Char] Int) -- | Get the stats string stat :: Socket -> IO (Either [Char] [[ByteString]]) -- | Restore the database with update log 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) -- | concatenate a value at the end of the existing record and shift it to -- the lef putshl :: Integral a => Socket -> ByteString -> ByteString -> a -> IO (Either String String) -- | store a record into a remote database object without response from the -- server putnr :: Socket -> ByteString -> ByteString -> IO () -- | initialize the iterator of a remote database object iterinit :: Socket -> IO (Either String String) -- | get the next key of the iterator of a remote database object iternext :: Socket -> IO (Either [Char] ByteString) -- | get forward matching keys in a remote database object fwmkeys :: Integral a => Socket -> ByteString -> a -> IO (Either [Char] [ByteString]) -- | Call a function of the script language extension ext :: Socket -> ByteString -> ByteString -> ByteString -> [TyrantOption] -> IO (Either [Char] ByteString) -- | Call a versatile function for miscellaneous operations funcname can be -- getlist, putlist and outlist getlist takes a list -- of keys and returns a list of values putlist takes a list of keys and -- values one after the other and returns [] outlist takes a list of keys -- and removes those records misc :: Socket -> ByteString -> [ByteString] -> [TyrantOption] -> IO (Either [Char] [ByteString]) instance Eq TyrantOption instance Show TyrantOption