tokyocabinet-haskell-0.0.5: Haskell binding of Tokyo Cabinet

Safe Haskell | None

Database.TokyoCabinet.TDB.C

Synopsis

- data OpenMode
  - = OREADER
  - | OWRITER
  - | OCREAT
  - | OTRUNC
  - | ONOLCK
  - | OLCKNB
  - | OTSYNC
- data TuningOption
  - = TLARGE
  - | TDEFLATE
  - | TBZIP
  - | TTCBS
  - | TEXCODEC
- data IndexType
  - = ITLEXICAL
  - | ITDECIMAL
  - | ITOPT
  - | ITVOID
  - | ITKEEP IndexType
- openModeToCInt :: OpenMode -> CInt
- tuningOptionToWord8 :: TuningOption -> Word8
- indexTypeToCInt :: IndexType -> CInt
- combineOpenMode :: [OpenMode] -> CInt
- combineTuningOption :: [TuningOption] -> Word8
- data TDB = TDB {
  - unTCTDB :: !(ForeignPtr TDB')
  }
- data TDB'
- c_tctdbnew :: IO (Ptr TDB')
- c_tctdbdel :: Ptr TDB' -> IO ()
- tctdbFinalizer :: FunPtr (Ptr TDB' -> IO ())
- c_tctdbecode :: Ptr TDB' -> IO CInt
- c_tctdbsetmutex :: Ptr TDB' -> IO Bool
- c_tctdbtune :: Ptr TDB' -> Int64 -> Int8 -> Int8 -> Word8 -> IO Bool
- c_tctdbsetcache :: Ptr TDB' -> Int32 -> Int32 -> Int32 -> IO Bool
- c_tctdbsetxmsiz :: Ptr TDB' -> Int64 -> IO Bool
- c_tctdbopen :: Ptr TDB' -> CString -> CInt -> IO Bool
- c_tctdbclose :: Ptr TDB' -> IO Bool
- c_tctdbput :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool
- c_tctdbput2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool
- c_tctdbput3 :: Ptr TDB' -> CString -> CString -> IO Bool
- c_tctdbputkeep :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool
- c_tctdbputkeep2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool
- c_tctdbputkeep3 :: Ptr TDB' -> CString -> CString -> IO Bool
- c_tctdbputcat :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool
- c_tctdbputcat2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool
- c_tctdbputcat3 :: Ptr TDB' -> CString -> CString -> IO Bool
- c_tctdbout :: Ptr TDB' -> Ptr Word8 -> CInt -> IO Bool
- c_tctdbout2 :: Ptr TDB' -> CString -> IO Bool
- c_tctdbget :: Ptr TDB' -> Ptr Word8 -> CInt -> IO (Ptr MAP)
- c_tctdbget2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr CInt -> IO (Ptr Word8)
- c_tctdbget3 :: Ptr TDB' -> CString -> IO CString
- c_tctdbvsiz :: Ptr TDB' -> Ptr Word8 -> CInt -> IO CInt
- c_tctdbvsiz2 :: Ptr TDB' -> CString -> IO CInt
- c_tctdbiterinit :: Ptr TDB' -> IO Bool
- c_tctdbiternext :: Ptr TDB' -> Ptr CInt -> IO (Ptr Word8)
- c_tctdbiternext2 :: Ptr TDB' -> IO CString
- c_tctdbfwmkeys :: Ptr TDB' -> Ptr Word8 -> CInt -> CInt -> IO (Ptr LIST)
- c_tctdbfwmkeys2 :: Ptr TDB' -> CString -> CInt -> IO (Ptr LIST)
- c_tctdbaddint :: Ptr TDB' -> Ptr Word8 -> CInt -> CInt -> IO CInt
- c_tctdbadddouble :: Ptr TDB' -> Ptr Word8 -> CInt -> CDouble -> IO CDouble
- c_tctdbsync :: Ptr TDB' -> IO Bool
- c_tctdboptimize :: Ptr TDB' -> Int64 -> Int8 -> Int8 -> Word8 -> IO Bool
- c_tctdbvanish :: Ptr TDB' -> IO Bool
- c_tctdbcopy :: Ptr TDB' -> CString -> IO Bool
- c_tctdbtranbegin :: Ptr TDB' -> IO Bool
- c_tctdbtrancommit :: Ptr TDB' -> IO Bool
- c_tctdbtranabort :: Ptr TDB' -> IO Bool
- c_tctdbpath :: Ptr TDB' -> IO CString
- c_tctdbrnum :: Ptr TDB' -> IO Word64
- c_tctdbfsiz :: Ptr TDB' -> IO Word64
- c_tctdbsetindex :: Ptr TDB' -> CString -> CInt -> IO Bool
- c_tctdbgenuid :: Ptr TDB' -> IO Int64

# Documentation

data OpenMode Source

Represents open mode

Constructors

OREADER | read only mode
OWRITER | write mode
OCREAT | if this value is included in open mode list, `open function' creates a new database if not exist.
OTRUNC | creates a new database regardless if one exists
ONOLCK | open the database file without file locking
OLCKNB | open the database file with locking performed without blocking.
OTSYNC | every transaction synchronizes updated contents with the device

Instances

Eq OpenMode |
Ord OpenMode |
Show OpenMode |

data TuningOption Source

Constructors

TLARGE |
TDEFLATE |
TBZIP |
TTCBS |
TEXCODEC |

Instances

Eq TuningOption |
Ord TuningOption |
Show TuningOption |

data IndexType Source

Represents the index type

Constructors

ITLEXICAL | for lexical string
ITDECIMAL | for decimal string
ITOPT | the index is optimized
ITVOID | the index is removed
ITKEEP IndexType | if the index exists, setindex function merely returns failure

Instances

Eq IndexType |
Ord IndexType |
Show IndexType |

openModeToCInt :: OpenMode -> CInt Source

tuningOptionToWord8 :: TuningOption -> Word8 Source

indexTypeToCInt :: IndexType -> CInt Source

combineOpenMode :: [OpenMode] -> CInt Source

combineTuningOption :: [TuningOption] -> Word8 Source

data TDB Source

Constructors

TDB |

Fields

unTCTDB :: !(ForeignPtr TDB')

Instances

TCDB TDB |

data TDB' Source

c_tctdbnew :: IO (Ptr TDB')Source

c_tctdbdel :: Ptr TDB' -> IO ()Source

tctdbFinalizer :: FunPtr (Ptr TDB' -> IO ())Source

c_tctdbecode :: Ptr TDB' -> IO CInt Source

c_tctdbsetmutex :: Ptr TDB' -> IO Bool Source

c_tctdbtune :: Ptr TDB' -> Int64 -> Int8 -> Int8 -> Word8 -> IO Bool Source

c_tctdbsetcache :: Ptr TDB' -> Int32 -> Int32 -> Int32 -> IO Bool Source

c_tctdbsetxmsiz :: Ptr TDB' -> Int64 -> IO Bool Source

c_tctdbopen :: Ptr TDB' -> CString -> CInt -> IO Bool Source

c_tctdbclose :: Ptr TDB' -> IO Bool Source

c_tctdbput :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool Source

c_tctdbput2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool Source

c_tctdbput3 :: Ptr TDB' -> CString -> CString -> IO Bool Source

c_tctdbputkeep :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool Source

c_tctdbputkeep2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool Source

c_tctdbputkeep3 :: Ptr TDB' -> CString -> CString -> IO Bool Source

c_tctdbputcat :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr MAP -> IO Bool Source

c_tctdbputcat2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr Word8 -> CInt -> IO Bool Source

c_tctdbputcat3 :: Ptr TDB' -> CString -> CString -> IO Bool Source

c_tctdbout :: Ptr TDB' -> Ptr Word8 -> CInt -> IO Bool Source

c_tctdbout2 :: Ptr TDB' -> CString -> IO Bool Source

c_tctdbget :: Ptr TDB' -> Ptr Word8 -> CInt -> IO (Ptr MAP)Source

c_tctdbget2 :: Ptr TDB' -> Ptr Word8 -> CInt -> Ptr CInt -> IO (Ptr Word8)Source

c_tctdbget3 :: Ptr TDB' -> CString -> IO CString Source

c_tctdbvsiz :: Ptr TDB' -> Ptr Word8 -> CInt -> IO CInt Source

c_tctdbvsiz2 :: Ptr TDB' -> CString -> IO CInt Source

c_tctdbiterinit :: Ptr TDB' -> IO Bool Source

c_tctdbiternext :: Ptr TDB' -> Ptr CInt -> IO (Ptr Word8)Source

c_tctdbiternext2 :: Ptr TDB' -> IO CString Source

c_tctdbfwmkeys :: Ptr TDB' -> Ptr Word8 -> CInt -> CInt -> IO (Ptr LIST)Source

c_tctdbfwmkeys2 :: Ptr TDB' -> CString -> CInt -> IO (Ptr LIST)Source

c_tctdbaddint :: Ptr TDB' -> Ptr Word8 -> CInt -> CInt -> IO CInt Source

c_tctdbadddouble :: Ptr TDB' -> Ptr Word8 -> CInt -> CDouble -> IO CDouble Source

c_tctdbsync :: Ptr TDB' -> IO Bool Source

c_tctdboptimize :: Ptr TDB' -> Int64 -> Int8 -> Int8 -> Word8 -> IO Bool Source

c_tctdbvanish :: Ptr TDB' -> IO Bool Source

c_tctdbcopy :: Ptr TDB' -> CString -> IO Bool Source

c_tctdbtranbegin :: Ptr TDB' -> IO Bool Source

c_tctdbtrancommit :: Ptr TDB' -> IO Bool Source

c_tctdbtranabort :: Ptr TDB' -> IO Bool Source

c_tctdbpath :: Ptr TDB' -> IO CString Source

c_tctdbrnum :: Ptr TDB' -> IO Word64 Source

c_tctdbfsiz :: Ptr TDB' -> IO Word64 Source

c_tctdbsetindex :: Ptr TDB' -> CString -> CInt -> IO Bool Source

c_tctdbgenuid :: Ptr TDB' -> IO Int64 Source