Skip to content

Commit

Permalink
Load bdb-0.5.5 into trunk.
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/knu/repos/ts/bdb/trunk@94 4830ddd0-7b3f-de11-9cfd-0015170b777a
  • Loading branch information
ts committed Apr 29, 2005
1 parent cf0e57d commit 22ac61e
Show file tree
Hide file tree
Showing 104 changed files with 2,516 additions and 631 deletions.
7 changes: 7 additions & 0 deletions Changes
Expand Up @@ -253,3 +253,10 @@

* compile for 4.3
* BDB::Sequence (not tested)

--- 0.5.5

* store_nil_as_null (see README.en)
* patch bdb_TXN (Thanks akira yamada <akira@debian.org>)


13 changes: 13 additions & 0 deletions README.en
Expand Up @@ -28,6 +28,18 @@

ruby extconf.rb --with-db-dir=/home/ts/local

* WARNING

With bdb >= 0.5.5 `nil' is stored as an empty string (when marshal is not
used).

Open the database with

"store_nil_as_null" => true

if you want the old behavior (`nil' stored as `\000')


* examples

examples/basic.rb simple access method
Expand All @@ -49,6 +61,7 @@

You can redistribute it and/or modify it under the same term as
Ruby.



Guy Decoux <ts@moulon.inra.fr>
23 changes: 15 additions & 8 deletions bdb.html
Expand Up @@ -14,8 +14,15 @@ <h1><a name="label-0" id="label-0">BDB</a></h1><!-- RDLabel: "BDB" -->
<p>Developers may choose to store data in any of several different
storage structures to satisfy the requirements of a particular
application. In database terminology, these storage structures and the
code that operates on them are called access methods.
The library includes support for the following access methods:</p>
code that operates on them are called access methods.</p>
<h2><a name="label-1" id="label-1">...............................................................</a></h2><!-- RDLabel: "..............................................................." -->
<p>With bdb &gt;= 0.5.5 <var>nil</var> is stored as an empty string (when marshal is not
used).</p>
<p>Open the database with</p>
<pre>"store_nil_as_null" =&gt; true</pre>
<p>if you want the old behavior (<var>nil</var> stored as `\000')</p>
<h2><a name="label-2" id="label-2">...............................................................</a></h2><!-- RDLabel: "..............................................................." -->
<p>The library includes support for the following access methods:</p>
<ul>
<li>B+tree: Stores keys in sorted order, using a default function that does
lexicographical ordering of keys.</li>
Expand All @@ -33,17 +40,17 @@ <h1><a name="label-0" id="label-0">BDB</a></h1><!-- RDLabel: "BDB" -->
<p><a href="docs/env.html">Berkeley DB environnement</a></p>
<p>Berkeley DB environment is an encapsulation of one or more databases,
log files and shared information about the database environment such
as shared memory buffer cache pages.
Acces Methods</p>
as shared memory buffer cache pages.</p>
<p>Acces Methods</p>
<ul>
<li><a href="docs/hashlike.html">Hash like interface</a>
these are the common methods for BDB::Btree,
BDB::Hash, BDB::Recno, BDB::Queue</li>
<li><a href="docs/arraylike.html">Array like interface</a>
methods for BDB::Recnum</li>
</ul>
<p><a href="docs/sequence.html">Sequence</a>
A sequence is created with BDB::Common::create_sequence or
<p><a href="docs/sequence.html">Sequence</a></p>
<p>A sequence is created with BDB::Common::create_sequence or
BDB::Common::open_sequence (only with db &gt;= 4.3)</p>
<p><a href="docs/transaction.html">Transaction Manager</a></p>
<p>The transaction subsystem makes operations atomic, consistent,
Expand All @@ -58,8 +65,8 @@ <h1><a name="label-0" id="label-0">BDB</a></h1><!-- RDLabel: "BDB" -->
allows traversal of the database and access to duplicate keyed
entries. Cursors are used for operating on collections of records,
for iterating over a database, and for saving handles to individual
records, so that they can be modified after they have been read.
See also iterators in <a href="docs/hashlike.html#each">Acces Methods</a></p>
records, so that they can be modified after they have been read.</p>
<p>See also iterators in <a href="docs/hashlike.html#each">Acces Methods</a></p>
<p><a href="docs/lock.html">Lock system</a></p>
<p>The lock subsystem provides interprocess and intraprocess concurrency
control mechanisms. While the locking system is used extensively by
Expand Down
68 changes: 22 additions & 46 deletions bdb.rd
Expand Up @@ -3,50 +3,50 @@

((<Download|URL:ftp://moulon.inra.fr/pub/ruby/>))

#^
Berkeley DB is an embedded database system that supports keyed access
to data.

Developers may choose to store data in any of several different
storage structures to satisfy the requirements of a particular
application. In database terminology, these storage structures and the
code that operates on them are called access methods.
#^

== ...............................................................

With bdb >= 0.5.5 ((|nil|)) is stored as an empty string (when marshal is not
used).

Open the database with

"store_nil_as_null" => true

if you want the old behavior (((|nil|)) stored as `\000')
== ...............................................................
The library includes support for the following access methods:
# module BDB
#^
* B+tree: Stores keys in sorted order, using a default function that does
lexicographical ordering of keys.
#^
# class Btree < Common
# end
#^
* Hashing: Stores records in a hash table for fast searches based
on strict equality, using a default that hashes on the key as a bit
string. Extended Linear Hashing modifies the hash function used by the
table as new records are inserted, in order to keep buckets underfull in
the steady state.
#^
# class Hash < Common
# end
#^
* Fixed and Variable-Length Records: Stores fixed- or
variable-length records in sequential order. Record numbers may be
immutable, requiring that new records be added only at the end
of the database, or mutable, permitting new records to be inserted
between existing records.
#^
# class Recno < Common
# end
((<Berkeley DB environnement|URL:docs/env.html>))
#^
Berkeley DB environment is an encapsulation of one or more databases,
log files and shared information about the database environment such
as shared memory buffer cache pages.
#^
# class Env
# end
Acces Methods
* ((<Hash like interface|URL:docs/hashlike.html>))
Expand All @@ -58,70 +58,46 @@ Acces Methods
((<Sequence|URL:docs/sequence.html>))
#^
A sequence is created with BDB::Common::create_sequence or
BDB::Common::open_sequence (only with db >= 4.3)
#^
# class Sequence
# end
((<Transaction Manager|URL:docs/transaction.html>))
#^
The transaction subsystem makes operations atomic, consistent,
isolated, and durable in the face of system and application
failures. The subsystem requires that the data be properly logged and
locked in order to attain these properties. Berkeley DB contains all
the components necessary to transaction-protect the Berkeley DB access
methods and other forms of data may be protected if they are logged
and locked appropriately.
#^
# class Txn
# end
((<Cursor operation|URL:docs/cursor.html>))
#^
A database cursor is a sequential pointer to the database entries. It
allows traversal of the database and access to duplicate keyed
entries. Cursors are used for operating on collections of records,
for iterating over a database, and for saving handles to individual
records, so that they can be modified after they have been read.
#^
# class Cursor
# end
See also iterators in ((<Acces Methods|URL:docs/hashlike.html#each>))
((<Lock system|URL:docs/lock.html>))

#^
The lock subsystem provides interprocess and intraprocess concurrency
control mechanisms. While the locking system is used extensively by
the Berkeley DB access methods and transaction system, it may also be
used as a stand-alone subsystem to provide concurrency control to any
set of designated resources.
#^
# class Lock
# end
((<Logging subsystem|URL:docs/log.html>))
#^
The logging subsystem is the logging facility used by Berkeley DB. It
is largely Berkeley DB specific, although it is potentially useful
outside of the Berkeley DB package for applications wanting
write-ahead logging support. Applications wanting to use the log for
purposes other than logging file modifications based on a set of open
file descriptors will almost certainly need to make source code
modifications to the Berkeley DB code base.
#^
##
## BDB::Env defines the following methods
##
## log_archive, log_checkpoint, log_curlsn, log_each, log_put, log_get,
## log_flush, log_reverse_each, log_stat
# class Log
# end
# end
=end
2 changes: 2 additions & 0 deletions bdbxml1/extconf.rb
@@ -1,3 +1,5 @@
# VERIFY 'myconfig' then comment this line

require 'mkmf'
load './myconfig'

Expand Down
3 changes: 3 additions & 0 deletions bdbxml2/README.en
Expand Up @@ -11,6 +11,9 @@

.... modify './myconfig' to adapt it to your configuration
IMPORTANT : you must use a version of xercesc compiled *without* threads
Comment in extconf.rb the line

VERIFY 'myconfig' then comment this line

.... This version must be used with [db-4.3.*, DbXml 2.0.*]

Expand Down

0 comments on commit 22ac61e

Please sign in to comment.