Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-kyoto-cabinet Reference Manual, version 0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:27:24 2020 GMT+0.
• Introduction | What cl-kyoto-cabinet is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
(in-package :kyoto-cabinet) (defparameter *db* (make-instance 'kc-dbm)) (dbm-open *db* "/tmp/hello.kch" :create :write) (dbm-put *db* "Ilya" "Sterin" :mode :keep) (dbm-get *db* "Ilya") (dbm-remove *db* "Ilya") (dbm-put *db* 123 "456" :mode :keep) (dbm-get *db* 123) (dbm-remove *db* 123) (defparameter *iter* (iter-open *db*)) (iter-first *iter*) (multiple-value-bind (key val) (iter-item *iter*) (list key val)) (iter-next *iter*) (dbm-put *db* 123 (make-array 2 :initial-contents '(75 76) :element-type '(unsigned-byte 8)) :mode :replace) (dbm-put *db* 123 (make-octet-vector 100 101) :mode :replace) (multiple-value-bind (key val) (iter-item *iter* :key-type :integer) (list key val))
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-kyoto-cabinet system |
Kevin Raison <last name @ chatsubo dot net>
New BSD
Lisp Interface to Kyoto Cabinet DBM (http://fallabs.com/kyotocabinet/)
0.1
cffi (at least version 0.10.3)
cl-kyoto-cabinet.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The cl-kyoto-cabinet/cl-kyoto-cabinet-package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-kyoto-cabinet.asd
cl-kyoto-cabinet (system)
Next: The cl-kyoto-cabinet/kyoto-cabinet-ffi․lisp file, Previous: The cl-kyoto-cabinet․asd file, Up: Lisp files [Contents][Index]
cl-kyoto-cabinet (system)
cl-kyoto-cabinet-package.lisp
Next: The cl-kyoto-cabinet/kyoto-cabinet․lisp file, Previous: The cl-kyoto-cabinet/cl-kyoto-cabinet-package․lisp file, Up: Lisp files [Contents][Index]
cl-kyoto-cabinet (system)
kyoto-cabinet-ffi.lisp
Next: The cl-kyoto-cabinet/kyoto-cabinet-dbm․lisp file, Previous: The cl-kyoto-cabinet/kyoto-cabinet-ffi․lisp file, Up: Lisp files [Contents][Index]
cl-kyoto-cabinet (system)
kyoto-cabinet.lisp
Previous: The cl-kyoto-cabinet/kyoto-cabinet․lisp file, Up: Lisp files [Contents][Index]
cl-kyoto-cabinet (system)
kyoto-cabinet-dbm.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-kyoto-cabinet-system package | ||
• The kyoto-cabinet-ffi package | ||
• The kyoto-cabinet package |
Next: The kyoto-cabinet-ffi package, Previous: Packages, Up: Packages [Contents][Index]
cl-kyoto-cabinet.asd
Next: The kyoto-cabinet package, Previous: The cl-kyoto-cabinet-system package, Up: Packages [Contents][Index]
CFFI interface to Kyoto Cabinet functions. The original C function names are preserved.
Previous: The kyoto-cabinet-ffi package, Up: Packages [Contents][Index]
A Lisp-style abstract interface to Kyoto
Cabinet. The original C function names are not preserved (see
the :kyoto-cabinet-ffi package for functions that do preserve the
nomenclature).
kc
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported macros, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Bound when in a transaction.
kyoto-cabinet.lisp (file)
Next: Exported functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Evaluates BODY with VAR bound to an open database.
Arguments:
- var (symbol): The binding for the new database object.
- filespec (filespec): The database file.
- type (symbol): A symbol that names a TC database class.
Rest:
- mode (symbols): :READ :WRITE :CREATE :TRUNCATE
:NOLOCK :NOBLOCK and :TSYNC
See the TC documentation for the meaning of the mode arguments.
kyoto-cabinet.lisp (file)
Evaluates BODY on with VAR bound to a new, open iterator on DB.
kyoto-cabinet.lisp (file)
Evaluates BODY in the context of a transaction on DB. If no transaction is in progress, a new one is started. If a transaction is already in progress, BODY is evaluated in its context. If an error occurs, the transaction will rollback, otherwise it will commit.
kyoto-cabinet.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Begins a transaction with DB.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Sets the caching parameters of DB. These are
described in the TC documentation.
The keyword arguments for B+ tree databases are:
- :LEAF : The number of leaf nodes to cache. Defaults to 1024.
- :NON-LEAF : The number of non-leaf nodes to cache. Defaults to 512.
The keyword arguments for hash databases are:
- :RECORDS : The number of records to cache. Defaults to 0.
kyoto-cabinet.lisp (file)
Removes all records from DB.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Closes an open KC database.
Arguments:
- db (object): A KC dbm object.
Returns:
- T on success, or NIL otherwise.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Commits a transaction with DB.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Deletes a KC database. If open, implicitly closes
it first.
Arguments:
- db (object): A KC dbm object.
Returns:
- NIL .
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Returns the size of the DB file in bytes.
kyoto-cabinet.lisp (file)
Returns the value under KEY in DB. Type may be one
of :STRING or :OCTETS , depending on how the value is to be
treated. :STRING indicates that the value should be converted to a
Lisp string, while :OCTETS indicates that the byte vector should be
returned.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Returns the number of records in DB.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Opens a new, or existing KC database.
Arguments:
- db (object): A KC dbm object.
- filespec (string): A pathname designator for the database file.
Rest:
- mode (list symbol): A list of mode keywords used when opening the
file. The modes are :KCOWRITER :KCOREADER :KCOCREATE :KCOTRUNCATE
:KCOAUTOTRAN :KCOAUTOSYNC :KCONOLOCK :KCOTRYLOCK :KCONOREPAIR
which correspond to those described in the KC specification.
Returns:
- The KC dbm object, now open.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Sets the DB optimization parameters on an open
database. These are described in the TC documentation.
The keyword arguments for B+ tree databases are:
- :LEAF (fixnum) : Sets the number of leaf nodes.
- :NON-LEAF (fixnum) : Sets the number of non-leaf nodes.
- :BUCKET-SIZE (fixnum) : Sets the bucket
- :REC-ALIGN (fixnum) : A power of 2 indicating record alignment.
- :FREE-POOL (fixnum): A power of 2 indicating the size of the free
record pool.
- :OPTS (list symbol): A list of keywords indicating optional database
parameters.
The keyword arguments for hash databases are:
:BUCKET-SIZE :REC-ALIGN :FREE-POOL and :OPTS , as above.
In both cases the :OPTS value is a list of one or more of
- :LARGE : Use a 64-bit bucket array to allow datbases > 2Gb.
- :DEFLATE : Use deflate compression.
- :BZIP : Use bzip compression.
- :TCBS : Use tcbs compression.
- :DEFAULTS : Use the current settings.
For example:
;;; (dbm-optimize db :leaf 512 :non-leaf 256 :bucket-size 100000000 ;;; :rec-align 4 :free-pool 10 :opts ’(:large :deflate))
kyoto-cabinet.lisp (file)
Inserts KEY and VALUE into DB. MODE varies with DB
class.
Arguments:
- db (object): A KC database object.
- key (object): A key under which to insert.
- value (object): A value to insert under key.
Key:
- :mode (symbol): A symbol designating one of the KC insertion modes:
replace, keep, concat, etc.
Valid modes for B+ tree databases are:
- :REPLACE : If a record with the same key exists in the database, it
is overwritten.
- :KEEP : If a record with the same key exists in the database, this
function has no effect.
- :CONCAT : Concatenates a value at the end of the existing record in
the database. If there is no corresponding record, a new record is
created.
Valid modes for hash databases are:
:REPLACE , :KEEP and :CONCAT , as above.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Removes the value under KEY in DB. If REMOVE-DUPS
is T, duplicate values will be removed from a B+ tree database.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Rolls back a transaction with DB.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Sets the DB extra mapped memory to SIZE bytes.
kyoto-cabinet.lisp (file)
Closes ITERATOR. Only effective for B+ tree databases.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Moves ITERATOR to the first record and returns T,
or NIL if the database is empty. Only effective for B+ tree
databases.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Moves ITERATOR to the record at KEY. Only effective for B+ tree databases.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Returns the current item in the iterator. ** DOES NOT advance the cursor **
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Returns current key at the ITERATOR position. Type
may be one of :STRING or :OCTETS , depending on how the value is to be
treated. :STRING indicates that the value should be converted to a
Lisp string, while :OCTETS indicates that the byte vector should be
returned.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Moves ITERATOR to the last record and returns T, or
NIL if the database is empty. Only effective for B+ tree databases.
kyoto-cabinet.lisp (file)
Moves ITERATOR to the next record and returns T, or NIL if already at the last record.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Opens an iterator on DB.
Arguments:
- db (object): A KC dbm object.
Returns:
- A TC iterator object.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Moves ITERATOR to the previous record and returns
T, or NIL if already at the first record. Only effective for B+ tree
databases.
kyoto-cabinet.lisp (file)
Inserts VALUE around ITERATOR. Mode may be one
of :CURRENT , :BEFORE or :AFTER . Only effective for B+ tree
databases.
kyoto-cabinet.lisp (file)
Removed the record at the ITERATOR position and advances ITERATOR, if possible. Only effective for B+ tree databases.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Returns the current value at ITERATOR. Type may be
one of :STRING or :OCTETS , depending on how the value is to be
treated. :STRING indicates that the value should be converted to a
Lisp string, while :OCTETS indicates that the byte vector should be
returned.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Sets the DB comparator function to that given by symbol FN.
kyoto-cabinet.lisp (file)
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
A KC database.
kyoto-cabinet.lisp (file)
standard-object (class)
A pointer to a KC native database object.
:ptr
ptr-of (generic function)
(setf ptr-of) (generic function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal symbol macros | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal classes | ||
• Internal types |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
kyoto-cabinet-ffi.lisp (file)
(kyoto-cabinet-ffi::%var-accessor-kcversion)
kyoto-cabinet-ffi.lisp (file)
(kyoto-cabinet-ffi::%var-accessor-kcvisnop)
kyoto-cabinet-ffi.lisp (file)
(kyoto-cabinet-ffi::%var-accessor-kcvisremove)
Next: Internal functions, Previous: Internal symbol macros, Up: Internal definitions [Contents][Index]
Converts anonymous enums to defconstants.
kyoto-cabinet-ffi.lisp (file)
Helper macro for managing string values.
kyoto-cabinet.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
Checks the list MODE for valid and consistent database opening arguments.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key is a 32-bit integer and the value an octet vector.
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key is a 32-but integer and the value a string.
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key and value are octet vectors.
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key is a vector of octets and value is a string.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key and value are cffi pointers.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key is a string and the value an octet vector. Note that for the key we allocate a foreign string that is not null-terminated.
kyoto-cabinet.lisp (file)
Returns a value from DB under KEY using FN where the key and value are strings.
kyoto-cabinet.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet-ffi.lisp (file)
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
Inserts VALUE into DB under KEY using FN where the key is a 32-bit integer and the value is an octet vector.
kyoto-cabinet.lisp (file)
Inserts VALUE into DB under KEY using FN where the key is a 32-bit integer and the value is a string.
kyoto-cabinet.lisp (file)
Inserts VALUE into DB under KEY using FN where the key and value are octet vectors.
kyoto-cabinet.lisp (file)
Inserts VALUE into DB under KEY using FN where the key and value are cffi pointers.
kyoto-cabinet.lisp (file)
Inserts VALUE into DB under KEY using FN where the key is a string and the value an octet vector. Note that for the key we allocate a foreign string that is not null-terminated.
kyoto-cabinet.lisp (file)
Inserts VALUE into DB under KEY using FN where the key and value are strings.
kyoto-cabinet.lisp (file)
Removes value from DB under KEY where the key is a 32-bit integer.
kyoto-cabinet.lisp (file)
Removes value from DB under KEY where the key is a octet vector
kyoto-cabinet.lisp (file)
Removes value from DB under KEY where the key is a cffi pointer
kyoto-cabinet.lisp (file)
Removes value from DB under KEY where the key is a string.
kyoto-cabinet.lisp (file)
kyoto-cabinet-ffi.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Returns the name of the DB file.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Iterates through all records and calls function fn for each record.
Arguments:
- db (object): A KC dbm object.
- fn (function): A callback function
Returns:
- Boolean representing true for success or false for failure.
kyoto-cabinet.lisp (file)
Checks the DB handle for any error reported by TC
and raises a {define-condition dbm-error} if one has occurred by
calling {defun raise-error} .
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
A KC pointer.
kyoto-cabinet.lisp (file)
A pointer to a KC native database object.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Raises a {define-condition dbm-error} with
MESSAGE. MESSAGE may be a format template, in which case the rest of
the arguments are taken to be format arguments for that template. The
error code and TC error message are automatically obtained from the DB
handle.
kyoto-cabinet.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet-dbm.lisp (file)
kyoto-cabinet.lisp (file)
Next: Internal classes, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
kyoto-cabinet.lisp (file)
error (condition)
The error code provided by KC.
:error-code
(quote nil)
error-code-of (generic function)
The error message provided by KC.
:error-msg
(quote nil)
error-msg-of (generic function)
Any additional message provided by the CL API.
(quote nil)
text (generic function)
Next: Internal types, Previous: Internal conditions, Up: Internal definitions [Contents][Index]
A KC database iterator, the superclass of both B+ tree cursors and hash iterators.
kyoto-cabinet.lisp (file)
standard-object (class)
A KC pointer.
:ptr
ptr-of (generic function)
(setf ptr-of) (generic function)
Previous: Internal classes, Up: Internal definitions [Contents][Index]
The 32bit built-in DBM key type.
kyoto-cabinet.lisp (file)
The 64bit built-in DBM key type.
kyoto-cabinet.lisp (file)
kyoto-cabinet.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
C D E F G I K M P R S T W |
---|
Jump to: | %
(
C D E F G I K M P R S T W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
E K P S T |
---|
Jump to: | *
E K P S T |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D I K O P S T |
---|
Jump to: | C D I K O P S T |
---|