new :: TCM a |
Create a database object.
|
|
delete :: a -> TCM () |
Free object resource forcibly.
|
|
open |
:: a | database object
| -> String | path to database file
| -> [OpenMode] | open mode
| -> TCM Bool | if successful, the return value is True
| Open a database file.
|
|
|
close :: a -> TCM Bool |
Close the database file. If successful, the return value is True
|
|
put |
:: (Storable k, Storable v) | | => a | database object
| -> k | key
| -> v | value
| -> TCM Bool | if successful, the return value is True
| Store a record.
|
|
|
putkeep |
:: (Storable k, Storable v) | | => a | database object
| -> k | key
| -> v | value
| -> TCM Bool | if successful, the return value is True
| Store a new recoed. If a record with the same key exists
in the database, this function has no effect.
|
|
|
putcat |
:: (Storable k, Storable v) | | => a | database object
| -> k | key
| -> v | value
| -> TCM Bool | if successful, the return value is True
| Concatenate a value at the end of the existing record.
|
|
|
get |
:: (Storable k, Storable v) | | => a | database object
| -> k | key
| -> TCM (Maybe v) | If successful, the return value is the
value of the corresponding record wrapped
by Just, else, Nothing is returned.
| Retrieve a record.
|
|
|
out |
:: Storable k | | => a | database object
| -> k | key
| -> TCM Bool | if successful, the return value is True
| Remove a record.
|
|
|
vsiz |
:: Storable k | | => a | database object
| -> k | key
| -> TCM (Maybe Int) | If successful, the return value
is the size of the value of the
corresponding record wrapped by
Just, else, it is Nothing.
| Get the size of the value of a record.
|
|
|
iterinit :: a -> TCM Bool |
Initialize the iterator. If successful, the return value is True.
|
|
iternext :: Storable v => a -> TCM (Maybe v) |
Get the next key of the iterator. If successful, the return
value is the next key wrapped by Just, else, it is Nothing.
|
|
fwmkeys |
:: (Storable k, Storable v, Sequence q) | | => a | database object
| -> k | search string
| -> Int | the maximum number of keys to be fetched
| -> TCM (q v) | result keys
| Get forward matching keys.
|
|
|
addint |
:: Storable k | | => a | database object
| -> k | key
| -> Int | the addtional value
| -> TCM (Maybe Int) | If the corresponding record
exists, the value is treated as an
integer and is added to. If no
record corresponds, a new record
of the additional value is stored.
| Add an integer to a record.
|
|
|
adddouble |
:: Storable k | | => a | database object
| -> k | key
| -> Double | the additional value
| -> TCM (Maybe Double) | If the corresponding record
exists, the value is treated as
a real number and is added
to. If no record corresponds, a
new record of the additional
value is stored.
| Add a real number to a record.
|
|
|
sync :: a -> TCM Bool |
Synchronize updated contents with the file and the device.
If successful, the return value is True.
|
|
vanish :: a -> TCM Bool |
Remove all records. If successful, the return value is True.
|
|
copy |
:: a | database object
| -> String | path of the destination file
| -> TCM Bool | If successful, the return value is True.
| Copy the database file.
|
|
|
path :: a -> TCM (Maybe String) |
Get the path of the database file.
|
|
rnum :: a -> TCM Word64 |
Get the number of records.
|
|
size :: a -> TCM Word64 |
Get the size of the database file.
|
|
ecode :: a -> TCM ECODE |
Get the last happened error code.
|
|
defaultExtension :: a -> String |
Get the default extension for specified database object.
|