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