summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libgdbm.tex
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2000-12-17 07:14:13 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2000-12-17 07:14:13 (GMT)
commite9e860faf36e0e75c4012a6ade881f8728d44723 (patch)
treeb97068bc6fb409b3b90d7999f051d939e5893780 /Doc/lib/libgdbm.tex
parente8f3ad560f5f094fbe514e5dae4977c855ee04a2 (diff)
downloadcpython-e9e860faf36e0e75c4012a6ade881f8728d44723.zip
cpython-e9e860faf36e0e75c4012a6ade881f8728d44723.tar.gz
cpython-e9e860faf36e0e75c4012a6ade881f8728d44723.tar.bz2
Add support for gdbm2 open flags ('s' and 'u'). Add module constant
open_flags which contains the flags supported by gdbm. Closes patch #102802.
Diffstat (limited to 'Doc/lib/libgdbm.tex')
-rw-r--r--Doc/lib/libgdbm.tex21
1 files changed, 15 insertions, 6 deletions
diff --git a/Doc/lib/libgdbm.tex b/Doc/lib/libgdbm.tex
index 2166d34..7e26b78 100644
--- a/Doc/lib/libgdbm.tex
+++ b/Doc/lib/libgdbm.tex
@@ -35,12 +35,21 @@ The optional \var{flag} argument can be
\code{'c'} (which creates the database if it doesn't exist), or
\code{'n'} (which always creates a new empty database).
-Appending \character{f} to the flag opens the database in fast mode;
-altered data will not automatically be written to the disk after every
-change. This results in faster writes to the database, but may result
-in an inconsistent database if the program crashes while the database
-is still open. Use the \method{sync()} method to force any unwritten
-data to be written to the disk.
+The following additional characters may be appended to the flag to
+control how the database is opened:
+
+\begin{itemize}
+\item \code{'f'} --- Open the database in fast mode. Writes to the database
+ will not be syncronized.
+\item \code{'s'} --- Synchronized mode. This will cause changes to the database
+ will be immediately written to the file.
+\item \code{'u'} --- Do not lock database.
+\end{itemize}
+
+Not all flags are valid for all versions of \code{gdbm}. The
+module constant \code{open_flags} is a string of supported flag
+characters. The exception \exception{error} is raised if an invalid
+flag is specified.
The optional \var{mode} argument is the \UNIX{} mode of the file, used
only when the database has to be created. It defaults to octal