aboutsummaryrefslogtreecommitdiffstats
path: root/dbutil.txi
diff options
context:
space:
mode:
Diffstat (limited to 'dbutil.txi')
-rw-r--r--dbutil.txi14
1 files changed, 14 insertions, 0 deletions
diff --git a/dbutil.txi b/dbutil.txi
index cc198f3..fae8bb6 100644
--- a/dbutil.txi
+++ b/dbutil.txi
@@ -65,6 +65,7 @@ alist-table is the default base-table type:
(define my-rdb (create-database "my.db" 'alist-table))
@end example
@end defun
+
@noindent
Only @code{alist-table} and base-table modules which have been
@code{require}d will dispatch correctly from the
@@ -79,6 +80,7 @@ argument.
Returns @emph{mutable} open relational database or #f.
@end deffn
+
@defun open-database rdb base-table-type
Returns an open relational database associated with @var{rdb}. The
@@ -90,22 +92,26 @@ Returns an open relational database associated with @var{rdb}.
@code{open-database} will attempt to deduce the correct base-table-type.
@end defun
+
@defun write-database rdb filename
Writes the mutable relational-database @var{rdb} to @var{filename}.
@end defun
+
@defun sync-database rdb
Writes the mutable relational-database @var{rdb} to the filename it was
opened with.
@end defun
+
@defun solidify-database rdb
Syncs @var{rdb} and makes it immutable.
@end defun
+
@defun close-database rdb
@var{rdb} will only be closed when the count of @code{open-database} - @code{close-database}
@@ -113,12 +119,14 @@ calls for @var{rdb} (and its filename) is 0. @code{close-database} returns #t i
and #f otherwise.
@end defun
+
@defun mdbm:report
Prints a table of open database files. The columns are the
base-table type, number of opens, @samp{!} for mutable, the
filename, and the lock certificate (if locked).
@end defun
+
@example
(mdbm:report)
@print{}
@@ -138,6 +146,7 @@ filename, and the lock certificate (if locked).
@code{#f}.
@end defun
+
@deffn {Procedure} open-table! rdb table-name
@var{rdb} must be a relational database and @var{table-name} a symbol.
@@ -146,6 +155,7 @@ filename, and the lock certificate (if locked).
@var{rdb} if it exists and can be opened in mutable mode, otherwise returns
@code{#f}.
@end deffn
+
@subsubheading Defining Tables
@@ -160,11 +170,13 @@ Representation}.
@end example
@end defun
+
@defun add-domain rdb row5
Use @code{define-domains} instead.
@end defun
+
@defun define-tables rdb spec-0 @dots{}
Adds tables as specified in @var{spec-0} @dots{} to the open
@@ -204,6 +216,7 @@ If @r{<domain>} is not a defined domain name and it matches the name of
this table or an already defined (in one of @var{spec-0} @dots{}) single
key field table, a foreign-key domain will be created for it.
@end defun
+
@subsubheading Listing Tables
@@ -217,3 +230,4 @@ and domains, its other key names and domains, and the table's records
The list returned by @code{list-table-definition}, when passed as an
argument to @code{define-tables}, will recreate the table.
@end defun
+