Commit 0b8f56fa authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

texify DB->open man page. Addresses #52.

git-svn-id: file:///svn/tokudb@1172 c7de825b-a66e-492c-adef-691d508d4ae1
parent d99cd305
MANPAGES = tdb_create tdb_del tdb_put MANPAGES = tdb_create tdb_del tdb_put tdb_open
MANPAGES_TEXI = $(patsubst %,%.texi,$(MANPAGES)) MANPAGES_TEXI = $(patsubst %,%.texi,$(MANPAGES))
MANPAGES_POD = $(patsubst %,%.pod,$(MANPAGES)) MANPAGES_POD = $(patsubst %,%.pod,$(MANPAGES))
MANPAGES_3 = $(patsubst %,%.3,$(MANPAGES)) MANPAGES_3 = $(patsubst %,%.3,$(MANPAGES))
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
@c man begin SYNOPSIS @c man begin SYNOPSIS
@code{#include <db.h>} @code{#include <db.h>}
@noindent
@code{int db_create(DB **}@var{dbp}@code{, DB_ENV *}@var{env}@code{, u_int32_t }@var{flags}@code{);} @code{int db_create(DB **}@var{dbp}@code{, DB_ENV *}@var{env}@code{, u_int32_t }@var{flags}@code{);}
@c man end @c man end
@unnumberedsubsec Description @unnumberedsubsec Description
......
@page
@section @code{DB->del} @section @code{DB->del}
@setfilename tokudb @setfilename tokudb
@settitle DB->del @settitle DB->del
...@@ -7,6 +8,7 @@ ...@@ -7,6 +8,7 @@
@c man begin SYNOPSIS @c man begin SYNOPSIS
@code{#include <db.h>} @code{#include <db.h>}
@noindent
@code{int DB->del(DB *}@var{db}@code{, DB_TXN *}@var{txnid}@code{, DBT*}@var{key}@code{, u_int32_t }@var{flags}@code{);} @code{int DB->del(DB *}@var{db}@code{, DB_TXN *}@var{txnid}@code{, DBT*}@var{key}@code{, u_int32_t }@var{flags}@code{);}
@c man end @c man end
@unnumberedsubsec Description @unnumberedsubsec Description
......
@page
@section @code{DB->open}
@setfilename tokudb
@settitle DB->open
@c man title db_open tokudb
@unnumberedsubsec Synopsis
@c man begin SYNOPSIS
@code{#include <db.h>}
@noindent
@code{int DB->open(DB *}@var{db}@code{, DB_TXN *}@var{txnid}@code{, const char *}@var{file}@code{, const char *}@var{database}@code{, DBTYPE }@var{type}@code{, u_int32_t }@var{flags}@code{, int }@var{mode}@code{);}
@c this works for latex (sort of) but not for texi2pod. It doesn't really work for latex either:
@c @multitable {@code{int DB->open(}} {for column two asdfasdfasdf}
@c @item @code{int DB->open(}
@c @tab @code{DB *}@var{db}@code{,}
@c @item @tie{}
@c @tab @code{DB_TXN *}@var{txnid}@code{,}
@c @item @tie{}
@c @tab @code{const char *}@var{file}@code{,}
@c @item @tie{}
@c @tab @code{const char *}@var{database}@code{,}
@c @item @tie{}
@c @tab @code{DBTYPE }@var{type}@code{,}
@c @item }
@c @tab @code{u_int32_t }@var{flags}@code{,}
@c @item
@c @tab @code{int }@var{mode}@code{);}
@c @end multitable
@c man end
@unnumberedsubsec Description
@c man begin DESCRIPTION
@code{DB->open} opens the database named by
@var{file}
and
@var{database.}
The database is opened read/write.
The @code{DB->open} operation is expensive. If possible, open a
database once, and reuse the @code{DB} handle for many operations.
TokuDB supports at most a few thousand databases per file.
@c man end
@unnumberedsubsec Parameters
@c man begin PARAMETERS
@table @var
@item db
A unopened @code{DB} handle that was created using @code{db_create()}.
@item txnid
Either @code{NULL} or a @code{TXNID}.
@item file
The name of the file that holds the database.
The @var{file} must be non-@code{NULL}. TokuDB does not currently support in-memory databases.
@item database
If @code{NULL} then the file contains only one unnamed database.
Otherwise @var{database} specifies the name of a database, stored
within the file, to open.
@item type
must be set to @code{DB_BTREE}. (TokuDB supports only dictionaries, not hash tables or queues.)
@item flags
must be zero or the bitwise-or of one or more of the following values:
@table @code
@item DB_CREATE
Create the database if it does not exist. If the database does not
already exist and @code{DB_CREATE} is not specified, then the
@code{DB->open} will fail.
@end table
@item mode
The mode (see @code{chmod(2)}) modified by the @code{umask(2)}, used when a file is created.
@end table
@c man end
@unnumberedsubsec Return Value
@c man begin RETURNVALUE
Returns zero on success. The following non-zero errors can be returned:
@table @code
@item DB_DEADLOCK
The system discovered deadlock cycle involving this and other transactions.
This operation was killed.
@item DB_LOCK_NOTGRANTED
In an environment configured for lock timeouts, the system was unable to grant a lock within the allowed time.
@item ENOENT
The file or directory does not exist.
@item EINVAL
You passed invalid parameters to this operation.
@end table
@c man end
@include everyman.texi
...@@ -35,6 +35,8 @@ Copyright @copyright{} 2007, Tokutek, Inc. ...@@ -35,6 +35,8 @@ Copyright @copyright{} 2007, Tokutek, Inc.
@include tdb_create.texi @include tdb_create.texi
@include tdb_open.texi
@include tdb_del.texi @include tdb_del.texi
@node Index @node Index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment