0
|
1 @c -*-texinfo-*-
|
|
2 @c This is part of the XEmacs Lisp Reference Manual.
|
|
3 @c Copyright (C) 1996 Ben Wing.
|
|
4 @c See the file lispref.texi for copying conditions.
|
|
5 @setfilename ../../info/databases.info
|
|
6 @node Databases, Processes, Range Tables, top
|
|
7 @chapter Databases
|
|
8 @cindex database
|
|
9
|
|
10 @defun databasep object
|
|
11 This function returns non-@code{nil} if @var{object} is a database.
|
|
12 @end defun
|
|
13
|
|
14 @menu
|
|
15 * Connecting to a Database::
|
|
16 * Working With a Database::
|
|
17 * Other Database Functions::
|
|
18 @end menu
|
|
19
|
|
20 @node Connecting to a Database
|
|
21 @section Connecting to a Database
|
|
22
|
|
23 @defun open-database file &optional type subtype access mode
|
|
24 This function opens database @var{file}, using database method
|
|
25 @var{type} and @var{subtype}, with access rights @var{access} and
|
|
26 permissions @var{mode}. @var{access} can be any combination of @code{r}
|
|
27 @code{w} and @code{+}, for read, write, and creation flags.
|
|
28 @end defun
|
|
29
|
|
30 @defun close-database obj
|
|
31 This function closes database @var{obj}.
|
|
32 @end defun
|
|
33
|
|
34 @defun database-live-p obj
|
|
35 This function returns @code{t} iff @var{obj} is an active database, else
|
|
36 @code{nil}.
|
|
37 @end defun
|
|
38
|
|
39 @node Working With a Database
|
|
40 @section Working With a Database
|
|
41
|
|
42 @defun get-database key dbase &optional default
|
|
43 This function finds the value for @var{key} in @var{database}. If there is no
|
|
44 corresponding value, @var{default} is returned (@code{nil} if @var{default} is
|
|
45 omitted).
|
|
46 @end defun
|
|
47
|
|
48 @defun map-database function dbase
|
|
49 This function maps @var{function} over entries in @var{database},
|
|
50 calling it with two args, each key and value in the database.
|
|
51 @end defun
|
|
52
|
|
53 @defun put-database key val dbase &optional replace
|
|
54 This function stores @var{key} and @var{val} in @var{database}. If
|
|
55 optional fourth arg @var{replace} is non-@code{nil}, replace any
|
|
56 existing entry in the database.
|
|
57 @end defun
|
|
58
|
|
59 @defun remove-database key dbase
|
|
60 This function removes @var{key} from @var{database}.
|
|
61 @end defun
|
|
62
|
|
63 @node Other Database Functions
|
|
64 @section Other Database Functions
|
|
65
|
|
66 @defun database-file-name obj
|
|
67 This function returns the filename associated with the database @var{obj}.
|
|
68 @end defun
|
|
69
|
|
70 @defun database-last-error &optional obj
|
|
71 This function returns the last error associated with database @var{obj}.
|
|
72 @end defun
|
|
73
|
|
74 @defun database-subtype obj
|
|
75 This function returns the subtype of database @var{obj}, if any.
|
|
76 @end defun
|
|
77
|
|
78 @defun database-type obj
|
|
79 This function returns the type of database @var{obj}.
|
|
80 @end defun
|