diff -Nru ruby-bdb-0.6.5/bdb.html ruby-bdb-0.6.6/bdb.html --- ruby-bdb-0.6.5/bdb.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdb.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - -bdb.rd - - -

BDB

-

Download

-

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:

- -

Berkeley DB environnement

-

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

- -

Sequence

-

A sequence is created with BDB::Common::create_sequence or -BDB::Common::open_sequence (only with db >= 4.3)

-

Transaction Manager

-

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.

-

Cursor operation

-

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.

-

See also iterators in Acces Methods

-

Lock system

-

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.

-

Logging subsystem

-

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.

- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/bdbxml.html ruby-bdb-0.6.6/bdbxml1/bdbxml.html --- ruby-bdb-0.6.5/bdbxml1/bdbxml.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/bdbxml.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ - - - - -Untitled - - -

BDB::XML

-

Berkeley DB XML is an embedded native XML datastore that provides for -the efficient storage and retrieval of XML encoded information.

-

Retrieval is supported by an XPath query engine that derives its efficiency -from indices generated from the stored XML data.

-

BDB::XML::Container

-

The container name provides the base for the filenames of the database -files used to store the container content. The directory within which -the files are opened is taken from the environment passed through the -Container constructor. If no environment was provided, then the -directory used will be the current working directory.

-

BDB::XML::Index

-

Define the indexing strategy for a Container

-

Indexing is specified by providing the name of a node and a list of indexing -strategies for that node.

-

BDB::XML::Document

-

A Document is the unit of storage within a Container.

-

A Document contains a stream of bytes that may be of type XML. -The Container only indexes the content of Documents -that contain XML.

-

Document supports annotation attributes.

-

BDB::XML::Context

-

The context within which a query is performed against a Container.

-

The context within which a query is performed against a Container -is complex enough to warrent an encapsulating class. This context -includes a namespace mapping, variable bindings, and flags that -determine how the query result set should be determined and returned -to the caller.

-

The XPath syntax permits expressions to refer to namespace prefixes, but -not to define them. The Context class provides a number of namespace -management methods so that the caller may manage the namespace prefix -to URI mapping.

-

The XPath syntax also permits expressions to refer to variables, but not -to define them. The Context class provides a number of methods so -that the caller may manage the variable to value bindings.

-

BDB::XML::Modify

-

Modify encapsulates the context within which a set of documents specified by -a query can be modified in place.

-

The modification is performed using the methods -BDB::XML::Container#modify and BDB::XML::Document#modify

-

There are two parts to the object -- the query and the operation. -The query identifies target nodes against which the operation is run. -The operation specifies what modifications to perform.

-

BDB::XML::Results

-

The results of a query are a collection of values. The values could -be either String, Float, true, false, BDB::XML::Documents or BDB::XML::Nodes

-

Implement only the method each

- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/container.html ruby-bdb-0.6.6/bdbxml1/docs/container.html --- ruby-bdb-0.6.5/bdbxml1/docs/container.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/container.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,239 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Container

-

The container name provides the base for the filenames of the database -files used to store the container content. The directory within which -the files are opened is taken from the environment passed through the -Container constructor. If no environment was provided, then the -directory used will be the current working directory.

-

Class Methods

-
-
allocate(name = nil, options = {})
-
-allocate a new Container object -
-
name
-
-the name of the container -
-
options
-
-Hash with the possible keys -
-
env
-
-the Berkeley DB environment within which all database -operations are to be performed. -
-
txn
-
-the transaction within which all database -operations are to be performed. -
-
set_pagesize
-
-Set the pagesize of the primary database (512 < size < 64K) -
-
-
-
-
dump(name, filename)
-
-Dump the container name into the specified file.
-
load(name, filename)
-
-Load data from the specified file into the container name
-
remove(name)
-
-Remove the container name
-
rename(name, newname)
-
-Rename the container name
-
salvage(name, filename, flags = 0)
-
-Verify the container name, and save the content in filename -
-
flags
-
-flags can has the value BDB::AGGRESSIVE -
-
-
set_name(name, str)
-
-Set the name for the container name. The underlying files for the -container are not renamed - for that, see Container::rename
-
verify(name)
-
-Verify the container name
-
-

Methods

-
-
close(flags = 0)
-
-close an open container -
-
flags
-
-flags can has the value 0 or BDB::NOSYNC -
-
-
delete(document, flags = 0)
-
-Remove the document from the container -
-
document
-
-document can be an ID or an BDB::XML::Document previously stored -
-
flags
-
-flags can has the value 0 or BDB::AUTO_COMMIT -
-
-
environment
-
env
-
-return the current environment for the container, or nil
-
environment?
-
env?
-
-return true if the container was opend in an environment
-
each {|doc| ... }
-
-Iterate over all documents
-
self[id]
-
get(id, flags = 0)
-
-Fetch the document from the container -
-
id
-
-the id assigned to the document when it was first added to a container -
-
flags
-
-flags can has the value 0 or BDB::DIRTY_READ, BDB::RMW -
-
-
self[id] = document
-
-Replace the document (see also #update)
-
index=(index)
-
-set the indexing : index must be an BDB::XML::Index object
-
index
-
-

Retrieve the BDB::XML::Index

-

Return nil if no indexing was specified

-
initialize(name, flags = 0, mode = 0)
-
-open the container -
-
name
-
-see allocate -
-
flags
-
-The flags must be the string "r", "r+", "w", "w+", "a", "a+" or -and integer value. -
-
mode
-
-mode for creation (see chmod(2)) -
-
-
modify(mod, context = nil, flags = 0)
-
-

in-place modification of all documents according to the state of the -BDB::XML::Modify object, which contains an XPath expression to -target document nodes, as well as specification of the modifications -to perform

-

context is an optional BDB::XML::Context used for the update -operations on the container.

-

flags must be set to zero or BDB::RMW to acquire a write lock

-
name
-
-return the name of the container
-
name=(str)
-
-Set the name of the container. Can be called only on a closed container -See also Container::set_name
-
open?
-
-return true if the container is open
-
parse(query, context = nil)
-
-Pre-parse an XPath query and return an BDB::XML::XPath object -
-
query
-
-the XPath query to execute against the container -
-
context
-
-the context within which the query will be executed -
-
-
push(document, flags = 0)
-
-Add a document to the container and return an ID -
-
document
-
-an object BDB::XML::Document or any object suitable for -BDB::XML::Document::new -
-
flags
-
-flags can be 0 or BDB::AUTO_COMMIT -
-
-
<<(document)
-
-Add a document to the container and return self
-
query(xpath, flags = 0)
-
query(string, context, flags = 0)
-
-

Query the container with an XPath expression, which can be an object -BDB::XML::XPath or a String

-
-
flags
-
-flags can have the value 0 or BDB::DIRTY_READ, BDB::RMW -
-
-

return a BDB::XML::Results object

-
search(xpath, returntype = BDB::XML::Context::Document) {|doc| ... }
-
-

Iterate over the result of a query

-

returntype can have the values BDB::XML::Context::Document -or BDB::XML::Context::Values

-

the query is evaluated lazily

-
transaction
-
-return the transaction associated with the container, or nil
-
in_transaction?
-
transaction?
-
-return true if the container is associated with a transaction
-
update(document)
-
-Update a document within the container
-
update_context {|cxt| ... }
-
context {|cxt| ... }
-
-

return an BDB::XML::UpdateContext which can be used to perform -[], []=, push, delete, update operation

-

This can be used for a performance improvement

-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/context.html ruby-bdb-0.6.6/bdbxml1/docs/context.html --- ruby-bdb-0.6.5/bdbxml1/docs/context.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/context.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Context

-

The context within which a query is performed against a Container.

-

The context within which a query is performed against a Container -is complex enough to warrent an encapsulating class. This context -includes a namespace mapping, variable bindings, and flags that -determine how the query result set should be determined and returned -to the caller.

-

The XPath syntax permits expressions to refer to namespace prefixes, but -not to define them. The Context class provides a number of namespace -management methods so that the caller may manage the namespace prefix -to URI mapping.

-

The XPath syntax also permits expressions to refer to variables, but not -to define them. The Context class provides a number of methods so -that the caller may manage the variable to value bindings.

-

Class Methods

-
-
allocate
-
-Allocate a new Context object
-
-

Methods

-
-
self[variable]
-
-Get the value bound to a variable
-
self[variable] = value
-
-Bind a value to a variable
-
clear_namespaces
-
clear
-
-Delete all the namespace prefix mappings
-
del_namespace(name)
-
-Delete the namespace URI for a particular prefix
-
evaltype
-
-Return the evaluation type
-
evaltype=(type)
-
-Set the evaluation type
-
get_namespace(name)
-
namespace[name]
-
-Get the namespace URI that a namespace prefix maps onto
-
initialize(returntype = nil, evaluation = nil)
-
-Initialize the object with the optional evaluation type -BDB::XML::Context::Lazy or BDB::XML::Context::Eager -and return type BDB::XML::Context::Documents, -BDB::XML::Context::Values or BDB::XML::Context::Candidates
-
metadata
-
with_metadata
-
-return true if the metadata is added to the document
-
metadata=(with)
-
with_metadata=(with)
-
-The with parameter specifies whether or not to add the document -metadata prior to the query.
-
returntype
-
-Return the return type
-
returntype=(type)
-
-Set the return type
-
namespace[name]=(uri)
-
set_namespace(name, uri)
-
-

Define a namespace prefix, providing the URI that it maps onto

-

If uri is nil delete the namespace

-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/document.html ruby-bdb-0.6.6/bdbxml1/docs/document.html --- ruby-bdb-0.6.5/bdbxml1/docs/document.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/document.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Document

-

A Document is the unit of storage within a Container.

-

A Document contains a stream of bytes.

-

Document supports annotation attributes.

-

Class Methods

-
-
allocate
-
-Allocate a new object
-
-

Methods

-
-
self[attr]
-
-Return the value of an attribute
-
self[attr] = val
-
-Set the value of an attribute
-
content
-
-Return the content of the document
-
content=(val)
-
-Set the content of the document
-
get(uri = "", attr [, class])
-
-

Return the value of an attribute. uri specify the namespace -where reside the attribute.

-

the optional class argument give the type (String, Numeric, ...)

-
id
-
-Return the ID
-
initialize(content = "")
-
-Initialize the document with the content specified
-
modify(mod)
-
-Modifies the document contents based on the information contained in the -BDB::XML::Modify object
-
name
-
-Return the name of the document
-
name=(val)
-
-Set the name of the document
-
prefix
-
-Return the default prefix for the namespace
-
prefix=(val)
-
-Set the default prefix used by set
-
query(xpath, context = nil)
-
-Execute the XPath expression xpath against the document -Return an BDB::XML::Results
-
set(uri = "", prefix = "", attr, value)
-
-Set an attribute in the namespace uri. prefix is the prefix -for the namespace
-
to_s
-
to_str
-
-Return the document as a String object
-
uri
-
-Return the default namespace
-
uri=(val)
-
-Set the default namespace used by set and get
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/index.html ruby-bdb-0.6.6/bdbxml1/docs/index.html --- ruby-bdb-0.6.5/bdbxml1/docs/index.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Index

-

The index specification

-

Class Methods

-
-
allocate
-
-Allocate a new Index object
-
-

Methods

-
-
add(uri = "", name, index)
-
-add a new index -
-
uri
-
-The namespace for the element (optional) -
-
name
-
-The name parameter provides the fully qualified element type -to be indexed. -
-
index
-
-The index string is a comma separated list of the following indexing -strategy names -
-
none-none-none-none
-
node-element-presence
-
node-attribute-presence
-
node-element-equality-string
-
node-element-equality-number
-
node-element-substring-string
-
node-attribute-equality-string
-
node-attribute-equality-number
-
node-attribute-substring-string
-
edge-element-presence
-
edge-attribute-presence
-
edge-element-equality-string
-
edge-element-equality-number
-
edge-element-substring-string
-
edge-attribute-equality-string
-
edge-attribute-equality-number
-
edge-attribute-substring-string
-
-
-
-
delete(uri = "", name, index)
-
-Delete the specified index
-
each {|uri, name, index| ... }
-
-Iterate over all indexes
-
initialize([[uri0, name0, index0] [, [uri1, name1, index1], ... ]])
-
-Initialize the index with the optional values [uri, name, value]
-
find(uri = "", name)
-
-

Find the indexing startegy associated with uri, and name

-

Return nil is no indexing strategy was defined

-
replace(uri = "", name, index)
-
-Replace the specified index
-
to_a
-
-Return an Array of all indexes
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/modify.html ruby-bdb-0.6.6/bdbxml1/docs/modify.html --- ruby-bdb-0.6.5/bdbxml1/docs/modify.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/modify.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Modify

-

Modify encapsulates the context within which a set of documents specified by -a query can be modified in place.

-

The modification is performed using the methods -BDB::XML::Container#modify and BDB::XML::Document#modify

-

There are two parts to the object -- the query and the operation. -The query identifies target nodes against which the operation is run. -The operation specifies what modifications to perform.

-

Class Methods

-
-
allocate
-
-Allocate a new object
-
-

Methods

-
-
count
-
-return the number of node hits in the specified query.
-
initialize(xpath, operation, type = BDB::XML::Modify::None, name = "", content = "", location = -1, context = nil)
-
-

xpath is a String, or an BDB::XML::Context object

-

operation can have the value BDB::XML::Modify::InsertAfter, -BDB::XML::Modify::InsertBefore, BDB::XML::Modify::Append, -BDB::XML::Modify::Update, BDB::XML::Modify::Remove or -BDB::XML::Modify::Rename.

-

type can have the value BDB::XML::Modify::Element, -BDB::XML::Modify::Attribute, BDB::XML::Modify::Text, -BDB::XML::Modify::ProcessingInstruction, BDB::XML::Modify::Comment or -BDB::XML::Modify::None.

-

name is the name for the new content.

-

content the content for operations that require content.

-

location indicate where a new child node will be placed for the -append operation

-

context is valid only when a String is given as the first argument. -This must be a BDB::XML::Context which contains the variable -bindings, the namespace prefix to URI mapping, and the query processing -flags.

-
encoding=(string)
-
-Specify a new character encoding for the modified documents.
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml1/docs/results.html ruby-bdb-0.6.6/bdbxml1/docs/results.html --- ruby-bdb-0.6.5/bdbxml1/docs/results.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml1/docs/results.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - - - - -Untitled - - -

BDB::XML::Results

-

The results of a query are a collection of values. The values could -be either String, Float, true, false, BDB::XML::Documents or BDB::XML::Nodes

-

Methods

-
-
each {|val| ... }
-
-Iterate on each values
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/bdbxml_features.h ruby-bdb-0.6.6/bdbxml2/bdbxml_features.h --- ruby-bdb-0.6.5/bdbxml2/bdbxml_features.h 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/bdbxml_features.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -#define HAVE_RB_BLOCK_CALL 1 -#define HAVE_DBXML_RB_NEW_PROTO 1 -#define HAVE_DBXML_CONST_CATEGORY_ALL 1 -#define HAVE_DBXML_CONST_CATEGORY_CONTAINER 1 -#define HAVE_DBXML_CONST_CATEGORY_DICTIONARY 1 -#define HAVE_DBXML_CONST_CATEGORY_INDEXER 1 -#define HAVE_DBXML_CONST_CATEGORY_MANAGER 1 -#define HAVE_DBXML_CONST_CATEGORY_NODESTORE 1 -#define HAVE_DBXML_CONST_CATEGORY_NONE 1 -#define HAVE_DBXML_CONST_CATEGORY_OPTIMIZER 1 -#define HAVE_DBXML_CONST_CATEGORY_QUERY 1 -#define HAVE_DBXML_CONST_DBXML_ADOPT_DBENV 1 -#define HAVE_DBXML_CONST_DBXML_ALLOW_AUTO_OPEN 1 -#define HAVE_DBXML_CONST_DBXML_ALLOW_EXTERNAL_ACCESS 1 -#define HAVE_DBXML_CONST_DBXML_ALLOW_VALIDATION 1 -#define HAVE_DBXML_CONST_DBXML_CACHE_DOCUMENTS 1 -#define HAVE_DBXML_CONST_DBXML_DOCUMENT_PROJECTION 1 -#define HAVE_DBXML_CONST_DBXML_ENCRYPT 1 -#define HAVE_DBXML_CONST_DBXML_GEN_NAME 1 -#define HAVE_DBXML_CONST_DBXML_INDEX_NODES 1 -#define HAVE_DBXML_CONST_DBXML_INDEX_VALUES 1 -#define HAVE_DBXML_CONST_DBXML_LAZY_DOCS 1 -#define HAVE_DBXML_CONST_DBXML_NO_AUTO_COMMIT 1 -#define HAVE_DBXML_CONST_DBXML_NO_INDEX_NODES 1 -#define HAVE_DBXML_CONST_DBXML_NO_STATISTICS 1 -#define HAVE_DBXML_CONST_DBXML_REVERSE_ORDER 1 -#define HAVE_DBXML_CONST_DBXML_STATISTICS 1 -#define HAVE_DBXML_CONST_DBXML_TRANSACTIONAL 1 -#define HAVE_DBXML_CONST_DBXML_WELL_FORMED_ONLY 1 -#define HAVE_DBXML_CONST_LEVEL_ALL 1 -#define HAVE_DBXML_CONST_LEVEL_DEBUG 1 -#define HAVE_DBXML_CONST_LEVEL_ERROR 1 -#define HAVE_DBXML_CONST_LEVEL_INFO 1 -#define HAVE_DBXML_CONST_LEVEL_NONE 1 -#define HAVE_DBXML_CONST_LEVEL_WARNING 1 -#define HAVE_DBXML_CONST_XMLCONTAINER_NODECONTAINER 1 -#define HAVE_DBXML_CONST_XMLCONTAINER_NODECONTAINER 1 -#define HAVE_DBXML_CONST_XMLCONTAINER_WHOLEDOCCONTAINER 1 -#define HAVE_DBXML_CONST_XMLCONTAINER_WHOLEDOCCONTAINER 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_CDATA 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_CHARACTERS 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_COMMENT 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_DTD 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_ENDDOCUMENT 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_ENDELEMENT 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_ENDENTITYREFERENCE 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_PROCESSINGINSTRUCTION 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_STARTDOCUMENT 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_STARTELEMENT 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_STARTENTITYREFERENCE 1 -#define HAVE_DBXML_CONST_XMLEVENTREADER_WHITESPACE 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_EQ 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_GT 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_GTE 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_LT 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_LTE 1 -#define HAVE_DBXML_CONST_XMLINDEXLOOKUP_NONE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_KEY_EQUALITY 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_KEY_NONE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_KEY_PRESENCE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_KEY_SUBSTRING 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_NODE_ATTRIBUTE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_NODE_ELEMENT 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_NODE_METADATA 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_NODE_NONE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_PATH_EDGE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_PATH_NODE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_PATH_NONE 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_UNIQUE_OFF 1 -#define HAVE_DBXML_CONST_XMLINDEXSPECIFICATION_UNIQUE_ON 1 -#define HAVE_DBXML_CONST_XMLMODIFY_ATTRIBUTE 1 -#define HAVE_DBXML_CONST_XMLMODIFY_COMMENT 1 -#define HAVE_DBXML_CONST_XMLMODIFY_ELEMENT 1 -#define HAVE_DBXML_CONST_XMLMODIFY_PROCESSINGINSTRUCTION 1 -#define HAVE_DBXML_CONST_XMLMODIFY_PROCESSINGINSTRUCTION 1 -#define HAVE_DBXML_CONST_XMLMODIFY_TEXT 1 -#define HAVE_DBXML_CONST_XMLQUERYCONTEXT_EAGER 1 -#define HAVE_DBXML_CONST_XMLQUERYCONTEXT_LAZY 1 -#define HAVE_DBXML_CONST_XMLQUERYCONTEXT_LIVEVALUES 1 -#define HAVE_DBXML_CONST_XMLVALUE_ANY_SIMPLE_TYPE 1 -#define HAVE_DBXML_CONST_XMLVALUE_ANY_URI 1 -#define HAVE_DBXML_CONST_XMLVALUE_BASE_64_BINARY 1 -#define HAVE_DBXML_CONST_XMLVALUE_BOOLEAN 1 -#define HAVE_DBXML_CONST_XMLVALUE_DATE 1 -#define HAVE_DBXML_CONST_XMLVALUE_DATE_TIME 1 -#define HAVE_DBXML_CONST_XMLVALUE_DAY_TIME_DURATION 1 -#define HAVE_DBXML_CONST_XMLVALUE_DECIMAL 1 -#define HAVE_DBXML_CONST_XMLVALUE_DOUBLE 1 -#define HAVE_DBXML_CONST_XMLVALUE_DURATION 1 -#define HAVE_DBXML_CONST_XMLVALUE_FLOAT 1 -#define HAVE_DBXML_CONST_XMLVALUE_G_DAY 1 -#define HAVE_DBXML_CONST_XMLVALUE_G_MONTH 1 -#define HAVE_DBXML_CONST_XMLVALUE_G_MONTH_DAY 1 -#define HAVE_DBXML_CONST_XMLVALUE_G_YEAR 1 -#define HAVE_DBXML_CONST_XMLVALUE_G_YEAR_MONTH 1 -#define HAVE_DBXML_CONST_XMLVALUE_HEX_BINARY 1 -#define HAVE_DBXML_CONST_XMLVALUE_NODE 1 -#define HAVE_DBXML_CONST_XMLVALUE_NONE 1 -#define HAVE_DBXML_CONST_XMLVALUE_NOTATION 1 -#define HAVE_DBXML_CONST_XMLVALUE_QNAME 1 -#define HAVE_DBXML_CONST_XMLVALUE_STRING 1 -#define HAVE_DBXML_CONST_XMLVALUE_TIME 1 -#define HAVE_DBXML_CONST_XMLVALUE_UNTYPED_ATOMIC 1 -#define HAVE_DBXML_CONST_XMLVALUE_YEAR_MONTH_DURATION 1 -#define HAVE_DBXML_MAN_COMPACT_CONTAINER 1 -#define HAVE_DBXML_MAN_TRUNCATE_CONTAINER 1 -#define HAVE_DBXML_MAN_GET_FLAGS 1 -#define HAVE_DBXML_MAN_GET_IMPLICIT_TIMEZONE 1 -#define HAVE_DBXML_MAN_EXISTS_CONTAINER 1 -#define HAVE_DBXML_MAN_REINDEX_CONTAINER 1 -#define HAVE_DBXML_MAN_DEFAULT_SEQUENCE_INCREMENT 1 -#define HAVE_DBXML_XML_INDEX_LOOKUP 1 -#define HAVE_DBXML_CON_INDEX_NODES 1 -#define HAVE_DBXML_CON_PAGESIZE 1 -#define HAVE_DBXML_CON_FLAGS 1 -#define HAVE_DBXML_CON_NODE 1 -#define HAVE_DBXML_XML_EVENT_WRITER 1 -#define HAVE_DBXML_XML_EVENT_READER 1 -#define HAVE_DBXML_CXT_VARIABLE_VALUE 1 -#define HAVE_DBXML_CXT_COLLECTION 1 -#define HAVE_DBXML_CXT_INTERRUPT 1 -#define HAVE_DBXML_CXT_TIMEOUT 1 -#define HAVE_DBXML_QUE_UPDATE 1 -#define HAVE_DBXML_RES_EVAL 1 -#define HAVE_DBXML_MOD_APPEND_STEP_RES 1 -#define HAVE_DBXML_VAL_TYPE_URI 1 -#define HAVE_DBXML_VAL_TYPE_NAME 1 -#define HAVE_DBXML_VAL_NODE_HANDLE 1 -#define HAVE_DBXML_CONST_DBXML_CHKSUM_SHA1 0 -#define HAVE_DBXML_CONST_XMLQUERYCONTEXT_DEADVALUES 0 -#define HAVE_DBXML_XML_EVENT_WRITER_ALLOC 0 -#define HAVE_DBXML_XML_EVENT_READER_ALLOC 0 -#define HAVE_DBXML_UPDATE_APPLY_CHANGES 0 -#define HAVE_DBXML_MOD_ENCODING 0 diff -Nru ruby-bdb-0.6.5/bdbxml2/bdbxml.html ruby-bdb-0.6.6/bdbxml2/bdbxml.html --- ruby-bdb-0.6.5/bdbxml2/bdbxml.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/bdbxml.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ - - - - -bdbxml.rd - - -

Berkeley DB XML is an embedded native XML datastore that provides for -the efficient storage and retrieval of XML encoded information.

-

Retrieval is supported by an Query query engine that derives its efficiency -from indices generated from the stored XML data.

-

The following classes are defined

-

BDB::XML::Manager

-
Provides a high-level object used to manage various aspects of Berkeley
-DB XML usage. You use XML::Manager to perform activities such as container
-management (including creation and open), preparing XQuery queries, 
-executing one-off queries, creating transaction objects, 
-creating update and query context objects
-
-A XML::Manager object can be created with BDB::Envmanager
-
-BDB::Transaction respond to the same method than BDB::XML::Manager
-

BDB::XML::Container

-
The XML::Container class encapsulates a document container and its 
-related indices and statistics. XML::Container exposes methods for
-managing (putting and deleting) XML::Document objects, managing indices,
-and retrieving container statistics.
-

BDB::XML::Index

-
Define the indexing strategy for a Container
-
-Indexing is specified by providing the name of a node and a list of
-indexing strategies for that node.
-

BDB::XML::Document

-
A Document is the unit of storage within a Container. A document consists
-of content, a name, and a set of metadata attributes.
-
-The document content is a byte stream. It must be well formed XML, 
-but need not be valid.
-

BDB::XML::Context

-
The Context class encapsulates the context within which a query
-is performed against an Container. The context includes namespace 
-mappings, variable bindings, and flags that indicate how the query result 
-set should be determined and returned to the caller. Multiple queries can 
-be executed within the same Context;
-
-Context allows you to define whether queries executed within the
-context are to be evaluated lazily or eagerly, and whether the query
-is to return live or dead values.
-
-The Query syntax permits expressions to refer to namespace prefixes,
-but not to define them. The Context class provides namespace
-management methods so that the caller may manage the namespace prefix to
-URI mapping. By default the prefix "dbxml" is defined to be
-"http://www.sleepycat.com/2002/dbxml". 
-
-The Query syntax also permits expressions to refer to externally
-defined variables. The XmlQueryContext class provides methods that
-allow the caller to manage the externally-declared variable to value
-bindings. 
-

BDB::XML::Modify

-
The XML::Modify class encapsulates the context within which a set of one
-or more documents specified by an XML::Query query can be modified in
-place. The modification is performed using an XML::Modify object, and a
-series of methods off that object that identify how the document is to
-be modified. Using these methods, the modification steps are
-identified. When the object is executed, these steps are performed in
-the order that they were specified. 
-
-The modification steps are executed against one or more documents
-using XML::Modify::execute. This method can operate on a single document
-stored in an XML::Value, or against multiple documents stored in an
-XML::Results set that was created as the result of a container or
-document query. 
-

BDB::XML::Results

-
The results of a query are a collection of values. The values could
-be either String, Float, true, false, BDB::XML::Value
-

BDB::XML::Value

-
Class which encapsulates the value of a node in an XML document.
-

BDB::XML::EventWriter

-
Class which enables applications to construct document content without using serialized XML.
-

BDB::XML::EventReader

-
Class which enables applications to read document content via a pull interface without
-materializing XML as text.
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/container.html ruby-bdb-0.6.6/bdbxml2/docs/container.html --- ruby-bdb-0.6.5/bdbxml2/docs/container.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/container.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ - - - - -docs/container.rd - - -

BDB::XML::Container

-

The XML::Container class encapsulates a document container and its -related indices and statistics. XML::Container exposes methods for -managing (putting and deleting) XML::Document objects, managing indices, -and retrieving container statistics.

-

Module included : Enumerable

-

Methods

-
-
delete(doc_or_name, context = nil)
-
-Remove the document from the container -
-
doc_or_name
-
-doc_or_name is an BDB::XML::Document previously stored, -or the name of an existent document -
-
context
-
-an optional Update context -
-
-
index?
-
-Returns true if the container is configured to create node indexes.
-
manager
-
-return the current manager for the container, or nil
-
pagesize
-
-Returns true if the container is configured to create node indexes.
-
each {|doc| ... }
-
-Iterate over all documents
-
self[id]
-
-Fetch the document from the container -
-
id
-
-the id assigned to the document when it was first added to a container -
-
flags
-
-flags can has the value 0 or BDB::DIRTY_READ, BDB::RMW -
-
-
get(id, flags = 0)
-
-same than self[id]
-
self[id] = document
-
-Replace the document (see also #update)
-
index = index
-
-set the indexing : index must be an XML::Index object
-
index
-
-

Retrieve the BDB::XML::Index

-

Return nil if no indexing was specified

-
add_index(uri, name, index, context = nil)
-
add_index(uri, name, type, syntax, context = nil)
-
-Add a new index : this is a convenient method. See XML::Index#add
-
add_default_index(index, context = nil)
-
-Add default index : this is a convenient method. See XML::Index#add_default
-
delete_index(index, context = nil)
-
-Delete an index : this is a convenient method. See XML::Index#delete
-
delete_default_index(index, context = nil)
-
-Delete default index : this is a convenient method. See XML::Index#delete_default
-
replace_index(index, context = nil)
-
-Replace an index : this is a convenient method. See XML::Index#replace
-
replace_default_index(index, context = nil)
-
-Replace default index : this is a convenient method. See XML::Index#replace_default
-
name
-
-return the name of the container
-
type
-
-Return the type of the container
-
put(document, flags = 0)
-
-Add a document to the container and return an ID -
-
document
-
-an object BDB::XML::Document -
-
flags
-
-flags can be 0 or BDB::XML::GEN_NAME -
-
-
transaction
-
-return the transaction associated with the container, or nil
-
in_transaction?
-
-return true if the container is associated with a transaction
-
transaction?
-
-same than in_transaction?
-
update(document, context = nil)
-
-Update a document within the container -
-
document
-
-an XML::Document to be updated -
-
context
-
-an optional Update context -
-
-
sync
-
-Flush database pages for the container to disk
-
flags
-
-Get the flags used to open the container.
-
node(handle, flags = 0)
-
-Get the specified node. -
-
handle
-
-must be obtained using XML::Value.node_handle -
-
flags
-
-must be set to 0 or, BDB::READ_UNCOMMITED -BDB::READ_UNCOMMITED, BDB::RMW -BDB::XML::LAZY_DOCS -
-
-
event_writer(document, update_context, flags = 0)
-
-

Begins insertion of an XML::Document into the container through use of an -XML::EventWriter object.

-

Return the XML::EventWriter which must be closed at end.

-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/context.html ruby-bdb-0.6.6/bdbxml2/docs/context.html --- ruby-bdb-0.6.5/bdbxml2/docs/context.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/context.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ - - - - -docs/context.rd - - -

BDB::XML::Context

-

The Context class encapsulates the context within which a query -is performed against an Container. The context includes namespace -mappings, variable bindings, and flags that indicate how the query result -set should be determined and returned to the caller. Multiple queries can -be executed within the same Context;

-

Context allows you to define whether queries executed within the -context are to be evaluated lazily or eagerly, and whether the query -is to return live or dead values.

-

The Query syntax permits expressions to refer to namespace prefixes, -but not to define them. The Context class provides namespace -management methods so that the caller may manage the namespace prefix to -URI mapping. By default the prefix "dbxml" is defined to be -"http://www.sleepycat.com/2002/dbxml".

-

The Query syntax also permits expressions to refer to externally -defined variables. The XmlQueryContext class provides methods that -allow the caller to manage the externally-declared variable to value -bindings.

-

Methods

-
-
self[variable]
-
-Get the value bound to a variable
-
self[variable] = value
-
-Bind a value to a variable
-
clear_namespaces
-
-Delete all the namespace prefix mappings
-
collection
-
-Discover the name of the default collection used by fn:collection() -with no arguments in an XQuery expression.
-
collection = uri
-
-

Set theURI specifying the name of the collection.

-

The default collection is that which is used by fn:collection() -without any arguments in an XQuery expression.

-
del_namespace(name)
-
-Delete the namespace URI for a particular prefix
-
evaltype
-
-Return the evaluation type
-
evaltype = type
-
-Set the evaluation type
-
get_namespace(name)
-
-Get the namespace URI that a namespace prefix maps onto
-
get_results(name)
-
-Same than Context#[] but return the sequence of values bound to the variable.
-
returntype
-
-Return the return type
-
returntype = type
-
-Set the return type
-
set_namespace(name, uri)
-
-

Define a namespace prefix, providing the URI that it maps onto

-

If uri is nil delete the namespace

-
uri
-
-Returns the base URI used for relative paths in query expressions.
-
uri = val
-
-Sets the base URI used for relative paths in query expressions.
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/document.html ruby-bdb-0.6.6/bdbxml2/docs/document.html --- ruby-bdb-0.6.5/bdbxml2/docs/document.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/document.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ - - - - -docs/document.rd - - -

BDB::XML::Document

-

A Document is the unit of storage within a Container. A document consists -of content, a name, and a set of metadata attributes.

-

The document content is a byte stream. It must be well formed XML, -but need not be valid.

-

included module : Enumerable

-

Methods

-
-
self[name]
-
-Returns the value of the specified metadata.
-
self[name] = val
-
-Set the value of the specified metadata.
-
content
-
-Return the content of the document
-
content = val
-
-Set the content of the document
-
each {|uri, name, value| ... }
-
each_metadata {|uri, name, value| ... }
-
-Iterate over all metadata
-
get_metadata(uri, name)
-
get_metadata(name)
-
get(uri, name)
-
get(name)
-
-Get the identified metadata from the document. -
-
manager
-
-Return the manager
-
name
-
-Return the name of the document
-
name = val
-
-Set the name of the document
-
remove_metadata(uri, name)
-
remove_metadata(name)
-
-Remove the identified metadata from the document. -
-
set_metadata(name, value)
-
set_metadata(uri, name, value)
-
set(name, value)
-
set(uri, name, value)
-
-Set the identified metadata from the document. -
-
to_s
-
-Return the document as a String object
-
to_str
-
-same than to_s
-
event_reader
-
-Retrieve content as an XML::EventReader.
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/event_reader.html ruby-bdb-0.6.6/bdbxml2/docs/event_reader.html --- ruby-bdb-0.6.5/bdbxml2/docs/event_reader.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/event_reader.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ - - - - -docs/event_reader.rd - - -

BDB::XML::EventReader

-

Class which enables applications to read document content via a pull interface without -materializing XML as text.

-

An XML::EventReader can be obtained with the method XML::Document#event_reader -or XML::Value#event_reader

-

Methods

-
-
attribute_count
-
-If the current event is StartElement, return the number of attributes available.
-
attribute_local_name(index)
-
-If the current event is StartElement, return the local name for the attribute at the -specified offset
-
attribute_namespace_uri(index)
-
-If the current event is StartElement, return the namespace URI for the attribute at the -specified offset.
-
attribute_prefix(index)
-
-If the current event is StartElement, return the namespace prefix for the attribute at the -specified offset.
-
attribute_specified?(index)
-
-If the current event is StartElement, return whether the attribute at the index indicated -is specified.
-
attribute_value(index)
-
-If the current event is StartElement, return the value for the attribute at the specified -offset.
-
close
-
-close the object
-
document_standalone?
-
-Return whether the document is standalone
-
empty_element?
-
-Return true if the current event is StartElement and the element has not content. -If the current even is not StartElement, an exception will be raised.
-
empty_element_info?
-
-Returns true if the XML::EventReader object will return whether an element is empty -or not in the context of the StartElement event.
-
encoding
-
-Returns the encoding for the document, if available.
-
encoding?
-
-Checks if the encoding was explicitly set.
-
entity_escape?
-
-If the current event is Characters, and XML::EventReader#entity_escape_info? is true, -returns whether the current text string requires escaping of entities for XML serialization.
-
entity_escape_info?
-
-Returns true if the XML::EventReader object is able to return information about text strings -indicating that they may have entities requiring escaping for XML serialization.
-
entity_info?
-
-Gets whether the XML::EventReader will include events of type StartEntityReference -and EndEntityReference.
-
entity_info=(boolean)
-
-The events of type StartEntityReference and EndEntityReference are used to report the start -and end of XML that was originally an entity reference in the XML text, but has since been -expanded. By default, these events are not reported.
-
event_type
-
-Return the event type of the current event
-
expand_entities?
-
-Gets whether the XML::EventReader will include events associated with expanded entities.
-
expand_entities=(boolean)
-
-Sets whether the XML::EventReader should include events associated with expanded entities.
-
local_name
-
-If the current event is StartElement or EndElement, return the local name for the element
-
namespace_uri
-
-If the current event is StartElement or EndElement, return the namespace URI for the element
-
next?
-
-Check if there are additional events available
-
next
-
-Move to the next event
-
next_tag
-
-Move to the next StartElement or EndElement
-
prefix
-
-If the current event is StartElement or EndElement, return the namespace prefix for the element
-
standalone?
-
-Checks if the standalone attribute was explicitly set.
-
system_id
-
-Returns the document's system ID, if available.
-
value
-
-If the current event is Characters, return the text value. If the current event is -ProcessingInstruction, return the data portion of the processing instruction.
-
version
-
-Returns the XML version string, if available.
-
whitespace?
-
-Return true if the current text value is entirely white space. The current event must be -one of Whitespace, Characters, or CDATA, or an exception will be raised..
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/event_writer.html ruby-bdb-0.6.6/bdbxml2/docs/event_writer.html --- ruby-bdb-0.6.5/bdbxml2/docs/event_writer.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/event_writer.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - - - -docs/event_writer.rd - - -

BDB::XML::EventWriter

-

Class which enables applications to construct document content without using serialized XML.

-

An XML::EventWriter can be obtained with the method XML::Document#event_writer

-

Methods

-
-
attribute(local_name, prefix = nil, uri = nil, value, speficied)
-
-Write a single attribute
-
close
-
-Close the object
-
dtd(text)
-
-Write the DTD
-
end_document
-
-Write an EndDocument event
-
end_element(local_name, prefix = nil, uri = nil)
-
-Write an EndElement event
-
end_entity(name)
-
-Write an EndEntity event
-
processing_instruction(target, data)
-
-Write a ProcessingInstruction event
-
start_document(version = nil, encoding = nil, standalone = nil)
-
-Write a StartDocument event
-
start_element(local_name, prefix = nil, uri = nil, nattr, empty)
-
-Write an element event
-
start_entity(name, expanded)
-
-Write StartEntityReference event
-
text(type, txt)
-
-

Write an text event

-

type must be one of XML::EventReader::Characters, XML::EventReader::Whitespace, -XML::EventReader::CDATA, or XML::EventReader::Comment

-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/index.html ruby-bdb-0.6.6/bdbxml2/docs/index.html --- ruby-bdb-0.6.5/bdbxml2/docs/index.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,175 +0,0 @@ - - - - -docs/index.rd - - -

BDB::XML::Index

-

The XML::Index class encapsulates the indexing specification of a container. -An indexing specification can be retrieved with the XML::Container#index -method, and modified using the XML::Container#index= method.

-

Note that adding an index to a container results in re-indexing all of -the documents in that container, which can take a very long time. It is -good practice to design an application to add useful indices before -populating a container.

-

Included module : Enumerable

-

Methods

-
-
add(uri, name, index)
-
add(uri, name, type, syntax)
-
-

call-seq:

-
add(uri, name, index)
-add(uri, name, type, syntax)
-

Add a new index

-
-
uri
-
-The namespace for the element -
-
name
-
-The name parameter provides the fully qualified element type -to be indexed. -
-
index
-
-The index string is a comma separated list of strings that represent -the indexing strategy -
-
type
-
-series of values bitwise OR'd together to form the -index strategy. -
-
syntax
-
-Identifies the type of information being indexed -
-
-
add_default(index)
-
-Adds an indexing strategy to the default index specification.
-
default
-
-return the default index specification
-
delete(uri, name, index)
-
delete(uri, name, type, syntax)
-
-Delete the specified index -
-
uri
-
-The namespace for the element -
-
name
-
-The name parameter provides the fully qualified element type -to be indexed. -
-
index
-
-The index string is a comma separated list of strings that represent -the indexing strategy -
-
type
-
-series of values bitwise OR'd together to form the -index strategy. -
-
syntax
-
-Identifies the type of information being indexed -
-
-
delete_default(index)
-
delete_default(type, syntax)
-
-Delete the identified index from the default index specification. -
-
index
-
-The index string is a comma separated list of strings that represent -the indexing strategy -
-
type
-
-series of values bitwise OR'd together to form the -index strategy. -
-
syntax
-
-Identifies the type of information being indexed -
-
-
each {|uri, name, index| ... }
-
-Iterate over all indexes
-
find(uri = "", name)
-
-

Find the indexing startegy associated with uri, and name

-

Return nil is no indexing strategy was defined

-
manager
-
-Return the manager associated with the Index
-
replace(uri, name, index)
-
replace(uri, name, type, syntax)
-
-Replaces the indexing strategies for a named document or metadata node. -All existing indexing strategies for that node are deleted, and the -indexing strategy identified by this method is set for the node. -
-
uri
-
-The namespace for the element -
-
name
-
-The name parameter provides the fully qualified element type -to be indexed. -
-
index
-
-The index string is a comma separated list of strings that represent -the indexing strategy -
-
type
-
-series of values bitwise OR'd together to form the -index strategy. -
-
syntax
-
-Identifies the type of information being indexed -
-
-
replace_default(index)
-
replace_default(type, syntax)
-
-Replace the default indexing strategy for the container. -
-
index
-
-The index string is a comma separated list of strings that represent -the indexing strategy -
-
type
-
-series of values bitwise OR'd together to form the -index strategy. -
-
syntax
-
-Identifies the type of information being indexed -
-
-
to_a
-
-Return an Array of all indexes
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/indexlookup.html ruby-bdb-0.6.6/bdbxml2/docs/indexlookup.html --- ruby-bdb-0.6.5/bdbxml2/docs/indexlookup.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/indexlookup.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ - - - - -docs/indexlookup.rd - - -

BDB::XML::IndexLookup

-

The XML::IndexLookup class encapsulates the context within which an -index lookup operation can be performed on an XML::Container object. The -lookup is performed using an XML::IndexLookup object, and a series of -methods of that object that specify how the lookup is to be -performed. Using these methods, it is possible to specify inequality -lookups, range lookups, and simple value lookups, as well as the sort -order of the results. By default, results are returned in the sort -order of the index.

-

XML::IndexLookup objects are created using XML::Manager::create_index_lookup, -or Txn::create_index_lookup

-

The following constant are defined NONE, EQ, GT, -GTE, LT, LTE

-

Methods

-
-
container
-
-Retrieve the current container
-
container=(con)
-
-Sets the container to be used for the index lookup operation. -The same object may be used for lookup in multiple containers by changing -this configuration.
-
execute(context = nil, flags = 0)
-
-Executes the index lookup operation specified by the configuration. -
-
context
-
-a XML::QueryContext object to use for this query -
-
flags
-
-the flags must be set to 0, OR'ing one of the value -BDB::XML::LAZY_DOCS, BDB::XML::REVERSE_ORDER, -BDB::XML::CACHE_DOCUMENTS, BDB::DEGREE_2, -BDB::DIRTY_READ, BDB::RMW -
-
-
high_bound
-
-Retrieve the operation and value used for the upper bound
-
high_bound=([value, operation])
-
-

call-seq:

-
self.high_bound = [value, operation]
-

Sets the operation and value to be used for the upper bound for a range -index lookup operation. The high bound must be specified to indicate a -range lookup.

-
index
-
-Retrieve the indexing strategy
-
index=(string)
-
-Set the indexing strategy to be used for the index lookup operation. -Only one index may be specified, and substring indexes are not supported.
-
low_bound
-
-Retrieve the operation and value used for the lower bound
-
low_bound=([value, operation])
-
-

call-seq:

-
self.low_bound = [value, operation]
-

Sets the operation and value to be used for the index lookup operation. -If the operation is a simple inequality lookup, the lower bound is used as -the single value and operation for the lookup. If the operation is a range -lookup, in which an upper bound is specified, the lower bound is used -as the lower boundary value and operation for the lookup.

-
manager
-
-Return the manager associated with the IndexLookup
-
node
-
-Retrieve the namespace and the name of the node
-
node_uri
-
-Retrieve the namespace of the node
-
node_name
-
-Retrieve the name of the node
-
node=([uri, name])
-
-Sets the name of the node to be used along with the indexing strategy -for the index lookup operation. -
-
uri
-
-The namespace of the node to be used. The default namespace is selected -by passing an empty string for the namespace -
-
name
-
-The name of the element or attribute node to be used. -
-
-
parent
-
-Retrieve the namespace and the name of the parent node
-
parent_uri
-
-Retrieve the namespace of the parent node
-
parent_name
-
-Retrieve the name of the parent node
-
parent=([uri, name])
-
-Sets the name of the parent node to be used for an edge index lookup -operation. If the index is not an edge index, this configuration is ignored. -
-
uri
-
-The namespace of the parent node to be used. The default namespace is -selected by passing an empty string for the namespace -
-
name
-
-The name of the parent element node to be used. -
-
-
transaction
-
-Return the transaction associated with the IndexLookup, if it was opened -in a transaction
-
transaction?
-
-Return true if the IndexLookup was opened in a transaction
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/manager.html ruby-bdb-0.6.6/bdbxml2/docs/manager.html --- ruby-bdb-0.6.5/bdbxml2/docs/manager.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/manager.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,394 +0,0 @@ - - - - -docs/manager.rd - - -

BDB::XML::Manager

-

Provides a high-level object used to manage various aspects of Berkeley -DB XML usage. You use XML::Manager to perform activities such as container -management (including creation and open), preparing XML::Query queries, -executing one-off queries, creating transaction objects, -creating update and query context objects

-

A XML::Manager object can be created with BDB::Env#manager

-

BDB::Transaction respond to the same method than BDB::XML::Manager

-

Class Methods

-
-
new(flags = 0)
-
-create a new Manager object that uses a private internal -database environment -
-
flags
-
-flags can have the value -
-
BDB::XML::ALLOW_EXTERNAL_ACCESS
-
-to allow queries to access external data sources -
-
BDB::XML::ALLOW_AUTO_OPEN
-
-to allow queries that reference unopened containers will -automatically open those containers -
-
-
-
-
-

Methods

-
-
create_container(name, flags = 0, type = XML::Container::NodeContainer, mode = 0)
-
-Creates and opens a container. If the container already exists at -the time this method is called, an exception is thrown. -
-
name
-
-container's name -
-
flags
-
-the flags to use for this container creation. -
-
type
-
-the type of container to create. -
-
mode
-
-mode for creation (see chmod(2)) -
-
-
create_document
-
-create a XML::Document object
-
create_modify
-
-create a XML::Modify object
-
create_query_context(rt = XML::Context::LiveValues, et = XML::Context::Eager)
-
-create a XML::Context object -
-
rt
-
-specifies whether to return live (XML::Context::LiveValues) -or dead values (XML::Context::DeadValues) -
-
et
-
-specifies if the resultants values are derived and -stored in-memory before query evaluation is completed -(XML::Context::Eager) or if they are calculated as you ask for them -(XML::Query::Lazy) -
-
-
create_results
-
-create a XML::Results object
-
begin(flags = 0)
-
-create a new transaction -
-
create_update_context
-
-create a XML::Update object
-
dump_container(name, path)
-
dump_container(name, io, to_close = false)
-
-Dumps the contents of the specified container. -
-
name
-
-name of the container -
-
path
-
-the pathname of the file where the contents will be dumped -
-
io
-
-object which respond to #write -
-
to_close
-
-if an IO object was given, specify if this object -must be closed at the end. -
-
-
env
-
-Returns the underlying environnement
-
home
-
-Returns the home directory for the underlying database environment
-
load_container(name, path, update = nil)
-
load_container(name, io, to_close = false, update = nil)
-
-Loads data from the specified path (or io) into the container. -
-
name
-
-name of the container to load. -
-
path
-
-the pathname of the file which contains the data. -
-
io
-
-an object which respond to #read -
-
update
-
-an optional update context -
-
-
open_container(name, flags = 0)
-
-Opens a container and return an XML::Container object -
-
name
-
-the container's name -
-
flags
-
-the flags to use for this container open. Specify -BDB::CREATE to create and open a new container. -
-
-
prepare(query, context = nil)
-
-

Compile a Query expression and return a new XML::Query object.

-

You can then use XML::Query#execute

-
-
query
-
-the query to compile -
-
context
-
-an optional query context -
-
-
query(query, context = nil) [{res| ... }
-
-

Execute a query. If a block is given it will call Xml::Results#each for -the results, or it will return an Xml::Results object

-

This is equivalent to call XML::Manager#prepare and then -XML::Query#execute

-
-
query
-
-the query to compile -
-
context
-
-an optional query context -
-
-
resolver = object
-
-

Register a resolver

-

A resolver is an object which can respond to #resolve_collection, -#resolve_document, #resolve_entity, #resolve_schema, #resolve_module -or #resolve_module_location

-

These methods (if implemented) must return nil if they can't resolve

-

def resolve_collection(txn_or_manager, uri)

-
Xml::Results.new
-

end

-

def resolve_document(txn_or_manager, uri)

-
Xml::Value.new
-

end

-

def resolve_entity(txn_or_manager, system_id, public_id)

-
'an object which respond to #read'
-

end

-

def resolve_schema(txn_or_manager, schema_location, namespace)

-
'an object which respond to #read'
-

end

-

def resolve_module(txn_or_manager, module_location, namespace)

-
'an object which respond to #read'
-

end

-

def resolve_module_location(txn_or_manager, namespace)

-
Xml::Results.new
-

end

-
remove_container(name)
-
-Remove a container -
-
name
-
-the name of the container to be removed. The container -must be closed -
-
-
rename_container(old_name, new_name)
-
-Rename a container -
-
old_name
-
-the name of the container to be renamed. -The container must be closed and must have been opened at least once -
-
new_name
-
-its new name -
-
-
container_flags
-
-Return the default container flags
-
container_flags = flags
-
-Set the default container flags for new XML::Container
-
container_type
-
-Return the default container type
-
container_type = type
-
-Set the default container type for new XML::Container
-
container_version(file)
-
-Examines the named file, and if it is a container, returns a non-zero -database format version. If the file does not exist, or is not a container, -zero is returned.
-
create_index_lookup(container, uri, name, index, value = nil, op = XML::IndexLookup::EQ)
-
-Instantiates an new XML::IndexLookup object for performing index lookup -operations. Only a single index may be specified, and substring indexes -are not supported. -
-
container
-
-The target container for the lookup operation -
-
uri
-
-The namespace of the node to be used. The default namespace is selected -by passing an empty string for the namespace. -
-
name
-
-The name of the element or attribute node to be used. -
-
index
-
-A comma-separated list of strings that represent the indexing strategy. -
-
value
-
-The value to be used as the single value for an equality or inequality -lookup, or as the lower bound of a range lookup. -
-
op
-
-Selects the operation to be performed. Must be one of: -XML::IndexLookup::NONE, XML::IndexLookup::EQ, XML::IndexLookup::GT, -XML::IndexLookup::GTE, XML::IndexLookup::LT, XML::IndexLookup::LTE . -
-
-
pagesize
-
-Return the current page size value
-
pagesize = size
-
-Set the current page size value
-
reindex_container(name, context = nil, flags = 0)
-
-

Reindex an entire container. The container should be backed up prior to using -this method, as it destroys existing indexes before reindexing. If the operation -fails, and your container is not backed up, you may lose information.

-

Use this call to change the type of indexing used for a container between -document-level indexes and node-level indexes. This method can take a very -long time to execute, depending on the size of the container, and should -not be used casually.

-
-
name
-
-The path to the container to be reindexed. -
-
context
-
-The update context to use for the reindex operation. -
-
flags
-
-Use XML::INDEX_NODES in order to index the container at -the node level; otherwise, it will be indexed at the document level. -
-
-
sequence_increment = increment
-
-Sets the integer increment to be used when pre-allocating document ids -for new documents created by XML::Container::put
-
sequence_increment
-
-Retrieve the integer increment.
-
update_container(name, context = nil)
-
-Upgrades the container from a previous version of Berkeley DB XML -
-
name
-
-name of the container to be upgraded -
-
context
-
-an optional update context -
-
-
verify_container(name, flags = 0)
-
verify_container(name, path, flags = BDB::SALVAGE)
-
verify_container(name, io, to_close = false, flags = BDB::SALVAGE)
-
-Checks that the container data files are not corrupt, and optionally -writes the salvaged container data to the specified pathname. -
-
name
-
-name of the container -
-
path
-
-name of the file where the container will be -dumped if BDB::SALVAGE is set. -
-
io
-
-an object which respond to #write if BDB::SALVAGE is set -
-
to_close
-
-if true the io will be closed at end. -
-
flags
-
-can have the value BDB::SALVAGE, BDB::AGGRESSIVE -
-
-
flags
-
-Get the flags used to open the manager.
-
implicit_timezone
-
-Get the implicit timezone used for queries
-
implicit_timezone=(tz)
-
-Set the implicit timezone used for queries
-
compact_container(name, context = Xml::Context.new)
-
-Compact the databases comprising the container.
-
truncate_container(name, context = XML::Context.new)
-
-Truncate the container.
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/modify.html ruby-bdb-0.6.6/bdbxml2/docs/modify.html --- ruby-bdb-0.6.5/bdbxml2/docs/modify.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/modify.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ - - - - -docs/modify.rd - - -

BDB::XML::Modify

-

The XML::Modify class encapsulates the context within which a set of one -or more documents specified by an XML::Query query can be modified in -place. The modification is performed using an XML::Modify object, and a -series of methods off that object that identify how the document is to -be modified. Using these methods, the modification steps are -identified. When the object is executed, these steps are performed in -the order that they were specified.

-

The modification steps are executed against one or more documents -using XML::Modify::execute. This method can operate on a single document -stored in an XML::Value, or against multiple documents stored in an -XML::Results set that was created as the result of a container or -document query.

-

Methods

-
-
append(query, type, name, content, location = -1)
-
-Appends the provided data to the selected node's child nodes. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
type
-
-Identifies the type of information to be inserted. -It can have the value XML::Modify::Element, XML::Modify::Attribute, -XML::Modify::Text, XML::Modify::Comment, orXML::Modify::PI -
-
name
-
-the name of the node, attribute, or processing instruction -to insert -
-
content
-
-The content to insert. -
-
location
-
-Identifies the position in the child node list -where the provided content is to be inserted -
-
-
insert_after(query, type, name, content)
-
-Inserts the provided data into the document after the selected node. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
type
-
-Identifies the type of information to be inserted. -It can have the value XML::Modify::Element, XML::Modify::Attribute, -XML::Modify::Text, XML::Modify::Comment, orXML::Modify::PI -
-
name
-
-the name of the node, attribute, or processing instruction -to insert -
-
content
-
-The content to insert. -
-
-
insert_before(query, type, name, content)
-
-Inserts the provided data into the document before the selected node. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
type
-
-Identifies the type of information to be inserted. -It can have the value XML::Modify::Element, XML::Modify::Attribute, -XML::Modify::Text, XML::Modify::Comment, orXML::Modify::PI -
-
name
-
-the name of the node, attribute, or processing instruction -to insert -
-
contentThe content to insert.
-
-
remove(query)
-
-Removes the node targeted by the selection expression. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
-
rename(query, name)
-
-Renames an element node, attribute node, or processing instruction. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
name
-
-The new name to give the targeted node. -
-
-
update(query, content)
-
-Replaces the targeted node's content with text. -
-
query
-
-provides the Query expression used to target the -location in the document where the modification is to be performed. -
-
content
-
-The content to use as the targeted node's content. -
-
-
execute(obj, context, update = nil)
-
-Executes one or more document modification operations (or steps) against -an XML::Results or XML::Value object. Upon completing the modification, -the modified document is automatically updated in the backing -XML::Container for you. -
-
obj
-
-The object to modify using this collection of -modification steps. -
-
context
-
-The XML::Context object to use for this modification. -
-
update
-
-The XML::Update object to use for this modification. -
-
-
encoding = string
-
-Specify a new character encoding for the modified documents.
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/results.html ruby-bdb-0.6.6/bdbxml2/docs/results.html --- ruby-bdb-0.6.5/bdbxml2/docs/results.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/results.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - -docs/results.rd - - -

BDB::XML::Results

-

The results of a query are a collection of values. The values could -be either String, Float, true, false, BDB::XML::Documents or BDB::XML::Nodes

-

Methods

-
-
add(val)
-
-Add a new value
-
each {|val| ... }
-
-Iterate on each values
-
size
-
-Returns the number of elements
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/docs/value.html ruby-bdb-0.6.6/bdbxml2/docs/value.html --- ruby-bdb-0.6.5/bdbxml2/docs/value.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/docs/value.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ - - - - -docs/value.rd - - -

BDB::XML::Value

-

The XML::Value class encapsulates the value of a node in an XML document.

-

Methods

-
-
attributes
-
-

return an XML::Results that contains all of the attributes appearing -on this node.

-

node type must be XML::Value::Node

-
boolean?
-
-return true if type is XML::Value::BOOLEAN
-
first_child
-
-

returns current node's first child node, or nil

-

node type must be XML::Value::Node

-
last_child
-
-

returns current node's last child node, or nil

-

node type must be XML::Value::Node

-
local_name
-
-

returns the node's local name.

-

node type must be XML::Value::Node

-
namespace
-
-

returns the URI used for the node's namespace.

-

node type must be XML::Value::Node

-
next_sibling
-
-

returns the sibling node immediately following this node in the -document, or nil.

-

node type must be XML::Value::Node

-
nil?
-
-return true if type is XML::Value::NONE
-
node?
-
-return true if type is XML::Value::NODE
-
node_name
-
-

return the type of the value contained in this value

-

node type must be XML::Value::Node

-
node_value
-
-

return the node's value

-

node type must be XML::Value::Node

-
number?
-
-return true if type is one of the numeric types
-
owner_element
-
-

If the current node is an attribute node, returns the document -element node that contains this attribute node. Otherwise, raise -an exception

-

node type must be XML::Value::Node

-
parent_node
-
-

returns current node's parent, or nil

-

node type must be XML::Value::Node

-
prefix
-
-

returns the prefix set for the node's namespace.

-

node type must be XML::Value::Node

-
previous_sibling
-
-

returns the sibling node immediately preceding this node -in the document, or nil

-

node type must be XML::Value::Node

-
string?
-
-return true if type is XML::Value::STRING
-
type?(type)
-
-return true if the value has the specified type
-
type
-
-return the type associated with a value
-
- - - diff -Nru ruby-bdb-0.6.5/bdbxml2/extconf.rb ruby-bdb-0.6.6/bdbxml2/extconf.rb --- ruby-bdb-0.6.5/bdbxml2/extconf.rb 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/bdbxml2/extconf.rb 2011-04-06 19:35:39.000000000 +0000 @@ -76,7 +76,7 @@ have_func("rb_block_call") -require 'features.rb' +require './features' create_makefile('bdbxml') begin diff -Nru ruby-bdb-0.6.5/Changes ruby-bdb-0.6.6/Changes --- ruby-bdb-0.6.5/Changes 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/Changes 2011-04-06 19:35:39.000000000 +0000 @@ -280,3 +280,12 @@ --- 0.6.4 * update for db 4.7 + +--- 0.6.5 + +* massive compatibility fixes +* introduced --enable-db-xml for use with bdbxml2 + +--- 0.6.6 + +* ruby 1.9 support diff -Nru ruby-bdb-0.6.5/debian/changelog ruby-bdb-0.6.6/debian/changelog --- ruby-bdb-0.6.5/debian/changelog 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/changelog 2014-03-28 01:08:40.000000000 +0000 @@ -1,3 +1,36 @@ +ruby-bdb (0.6.6-0+rpi1) unstable; urgency=medium + + * Upload to Raspbian based on Debian packaging git repo. + + [David Suárez] + * Build for all ruby versions (Closes: #730960) + * Add patch 'dont-rely-on-ruby-objects-to-accommodate-c-data' + * Add patch 'remove-src-dir-from-tests-load-path' + * Add patch 'fix-inheritance' + * Add patch 'use-same-encoding-for-dup-test' + * Update standards version; no changes needed + * Change upload urgency to medium + * Generate and install rdoc documentation + * Improve package description + * debian/rules: + + Don't create some, packaged, empty dirs + + Improve clean rule + * debian/copyright: + + use correct license short name + + remove some wrong tabs + + [ Paul van Tilburg ] + * debian/watch: use githubredir instead of gemwatch as gem release don't + seem to be far behind releases on github. + + [ Gunnar Wolf ] + * New upstream version (Closes: #741210) + * Drop transitional packages (closes: #735693) + * Check whether constants were already defined before removing them at + build time + + -- Peter Michael Green Fri, 28 Mar 2014 01:08:29 +0000 + ruby-bdb (0.6.5-7) unstable; urgency=low [ Ondřej Surý ] diff -Nru ruby-bdb-0.6.5/debian/control ruby-bdb-0.6.6/debian/control --- ruby-bdb-0.6.5/debian/control 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/control 2014-03-28 01:06:49.000000000 +0000 @@ -2,67 +2,28 @@ Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers -Uploaders: Lucas Nussbaum , Michael Schutte , Gunnar Wolf , Antonio Terceiro -DM-Upload-Allowed: yes +Uploaders: Lucas Nussbaum , + Michael Schutte , + Gunnar Wolf , + Antonio Terceiro Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.3~), libdb-dev -Standards-Version: 3.9.2 -Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-bdb.git -Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-bdb.git;a=summary +Standards-Version: 3.9.5 +Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-bdb.git +Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-bdb.git;a=summary Homepage: https://rubyforge.org/projects/bdb/ -XS-Ruby-Versions: ruby1.8 +XS-Ruby-Versions: all Package: ruby-bdb Architecture: any XB-Ruby-Versions: ${ruby:Versions} -Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter -Conflicts: libdb4.2-ruby1.8 (<< 0.6.4-1), libdb4.3-ruby1.8 (<< 0.6.4-1), libdb4.4-ruby1.8 (<< 0.6.4-1), libdb-ruby1.8 (<< 0.6.5-7) -Replaces: libdb4.2-ruby1.8 (<< 0.6.4-1), libdb4.3-ruby1.8 (<< 0.6.4-1), libdb4.4-ruby1.8 (<< 0.6.4-1), libdb-ruby1.8 (<< 0.6.5-7) -Provides: libdb4.2-ruby1.8, libdb4.3-ruby1.8, libdb4.4-ruby1.8, libdb-ruby1.8 -Description: Interface to Berkeley DB for Ruby 1.8 +Depends: libjs-jquery, + ruby | ruby-interpreter, + ${misc:Depends}, + ${shlibs:Depends} +Description: interface to Berkeley DB for Ruby BDB is an interface to the Berkeley database library. . - This package provides BDB linked to the default Debian libdb version. - -Package: libdb4.2-ruby1.8 -Architecture: all -Priority: extra -Depends: ${misc:Depends}, ruby-bdb -Section: oldlibs -Description: transitional package for ruby-bdb - BDB is an interface to the Berkeley database library. + Berkeley DB is an embedded database system that supports keyed access + to data. . - This is a dummy transitional package to enable the move to a new - package name. It can be safely removed from your system. - -Package: libdb4.3-ruby1.8 -Architecture: all -Priority: extra -Depends: ${misc:Depends}, ruby-bdb -Section: oldlibs -Description: transitional package for ruby-bdb - BDB is an interface to the Berkeley database library. - . - This is a dummy transitional package to enable the move to a new - package name. It can be safely removed from your system. - -Package: libdb4.4-ruby1.8 -Architecture: all -Priority: extra -Depends: ${misc:Depends}, ruby-bdb -Section: oldlibs -Description: transitional package for ruby-bdb - BDB is an interface to the Berkeley database library. - . - This is a dummy transitional package to enable the move to a new - package name. It can be safely removed from your system. - -Package: libdb-ruby1.8 -Architecture: all -Priority: extra -Depends: ${misc:Depends}, ruby-bdb -Section: oldlibs -Description: transitional package for ruby-bdb - BDB is an interface to the Berkeley database library. - . - This is a dummy transitional package to enable the move to a new - package name. It can be safely removed from your system. + This package provides BDB linked to the default Debian libdb version. diff -Nru ruby-bdb-0.6.5/debian/copyright ruby-bdb-0.6.6/debian/copyright --- ruby-bdb-0.6.5/debian/copyright 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/copyright 2014-03-28 01:06:49.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=173 +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bdb Upstream-Contact: Akinori MUSHA Source: https://rubyforge.org/projects/bdb/ @@ -12,8 +12,8 @@ License: Ruby or GPL-2 Files: debian/* - Copyright: Copyright 2011 Ondřej Surý - License: GPL2+ +Copyright: Copyright 2011 Ondřej Surý +License: GPL-2+ License: Ruby Ruby is copyrighted free software by Yukihiro Matsumoto . @@ -31,7 +31,7 @@ make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. - . + . b) use the modified software only within your corporation or organization. . @@ -62,9 +62,9 @@ For the list of those files and their copying conditions, see the file LEGAL. . - 5. The scripts and library files supplied as input to or produced as + 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, + copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. . @@ -86,7 +86,6 @@ License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. - License: GPL-2+ The files hereby included are free software; you can distribute them under the terms of the GNU General Public License as published by the diff -Nru ruby-bdb-0.6.5/debian/patches/doc-in-a-single-dir.patch ruby-bdb-0.6.6/debian/patches/doc-in-a-single-dir.patch --- ruby-bdb-0.6.5/debian/patches/doc-in-a-single-dir.patch 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/doc-in-a-single-dir.patch 2014-03-28 01:06:49.000000000 +0000 @@ -1,56 +1,68 @@ -diff -Nur -x '*.orig' -x '*~' libdb-ruby-0.6.5/bdb.html libdb-ruby-0.6.5.new/bdb.html ---- libdb-ruby-0.6.5/bdb.html 2005-02-15 11:06:21.000000000 -0600 -+++ libdb-ruby-0.6.5.new/bdb.html 2008-12-09 10:37:05.000000000 -0600 -@@ -37,22 +37,22 @@ +Index: ruby-bdb/bdb.rd +=================================================================== +--- ruby-bdb.orig/bdb.rd 2014-01-17 13:23:55.000000000 -0600 ++++ ruby-bdb/bdb.rd 2014-01-17 13:33:24.000000000 -0600 +@@ -41,7 +41,7 @@ of the database, or mutable, permitting new records to be inserted - between existing records. - --

Berkeley DB environnement

-+

Berkeley DB environnement

-

Berkeley DB environment is an encapsulation of one or more databases, + between existing records. + +-(()) ++(()) + + 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

- --

Sequence

-+

Sequence

-

A sequence is created with BDB::Common::create_sequence or - BDB::Common::open_sequence (only with db >= 4.3)

--

Transaction Manager

-+

Transaction Manager

-

The transaction subsystem makes operations atomic, consistent, + BDB::Hash, BDB::Recno, BDB::Queue + +- * (()) ++ * (()) + methods for BDB::Recnum + + +-(()) ++(()) + + A sequence is created with BDB::Common::create_sequence or + BDB::Common::open_sequence (only with db >= 4.3) + +-(()) ++(()) + + 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 -@@ -60,20 +60,20 @@ - the components necessary to transaction-protect the Berkeley DB access +@@ -72,7 +72,7 @@ methods and other forms of data may be protected if they are logged - and locked appropriately.

--

Cursor operation

-+

Cursor operation

-

A database cursor is a sequential pointer to the database entries. It + and locked appropriately. + +-(()) ++(()) + + 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, +@@ -80,9 +80,9 @@ 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 Acces Methods

--

Lock system

-+

See also iterators in Acces Methods

-+

Lock system

-

The lock subsystem provides interprocess and intraprocess concurrency + records, so that they can be modified after they have been read. + +-See also iterators in (()) ++See also iterators in (()) + +-(()) ++(()) + + 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 +@@ -90,7 +90,7 @@ used as a stand-alone subsystem to provide concurrency control to any - set of designated resources.

--

Logging subsystem

-+

Logging subsystem

-

The logging subsystem is the logging facility used by Berkeley DB. It + set of designated resources. + +-(()) ++(()) + + 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 diff -Nru ruby-bdb-0.6.5/debian/patches/dont-rely-on-ruby-objects-to-accommodate-c-data ruby-bdb-0.6.6/debian/patches/dont-rely-on-ruby-objects-to-accommodate-c-data --- ruby-bdb-0.6.5/debian/patches/dont-rely-on-ruby-objects-to-accommodate-c-data 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/dont-rely-on-ruby-objects-to-accommodate-c-data 2014-03-28 01:06:49.000000000 +0000 @@ -0,0 +1,469 @@ +Description: Don't use ruby objects to accommodate C data + Fix segfaults, due to incorrect memory access and the use of ruby level functions, + in case the ruby objects were not cleanly (explicitily) closed. + +Author: David Suárez +Last-Update: 2014-03-12 + +--- a/src/bdb.h ++++ b/src/bdb.h +@@ -159,10 +159,21 @@ struct ary_st { + VALUE *ptr; + }; + ++typedef enum BDB_OBJ_TYPE {BDB_OBJ_UNKNOWN, BDB_OBJ_DB, /*BDB_OBJ_ENV, BDB_OBJ_LOG, */ BDB_OBJ_LOCK, BDB_OBJ_TX}; ++ ++struct bdb_objassoc { ++ VALUE obj; ++ void* obj_ptr; ++ enum BDB_OBJ_TYPE obj_type; ++}; ++ ++struct bdb_objassoc* create_assoc(VALUE obj, void* obj_ptr, enum BDB_OBJ_TYPE obj_type); ++ + typedef struct { + int options; + VALUE marshal; + struct ary_st db_ary; ++ struct ary_st db_objassoc_ary; + VALUE home; + DB_ENV *envp; + #if HAVE_DB_LOG_REGISTER_4 || HAVE_ST_DB_ENV_LG_INFO +@@ -214,7 +225,9 @@ typedef struct { + int status, options; + VALUE marshal, mutex; + struct ary_st db_ary; ++ struct ary_st db_objassoc_ary; + struct ary_st db_assoc; ++ struct ary_st db_assoc_objassoc_ary; + VALUE env; + DB_TXN *txnid; + DB_TXN *parent; +@@ -238,6 +251,7 @@ typedef struct { + VALUE marshal; + DBTYPE type; + VALUE env, orig, secondary, txn; ++ bdb_ENV* env_ptr; + VALUE filename, database; + VALUE bt_compare, bt_prefix, h_hash; + #if HAVE_CONST_DB_DUPSORT +@@ -295,6 +309,7 @@ typedef struct { + typedef struct { + unsigned int lock; + VALUE env, self; ++ bdb_ENV *env_ptr; + } bdb_LOCKID; + + typedef struct { +@@ -573,6 +588,12 @@ extern VALUE bdb_ary_delete _((struct ar + extern void bdb_ary_mark _((struct ary_st *)); + extern VALUE bdb_respond_to _((VALUE, ID)); + ++/* for internal close */ ++extern VALUE bdb_internal_close(bdb_DB *dbst, bdb_ENV *envst); ++extern VALUE txn_free(bdb_TXN *txnst); ++extern VALUE bdb_ary_delete_assoc(struct ary_st *db_ary, VALUE val); ++extern void lockid_free( bdb_LOCKID *dblockid); ++ + #if ! HAVE_ST_DBC_C_CLOSE && HAVE_ST_DBC_CLOSE + #define c_close close + #undef HAVE_ST_DBC_C_CLOSE +--- a/src/common.c ++++ b/src/common.c +@@ -149,6 +149,31 @@ bdb_ary_delete(struct ary_st *db_ary, VA + return Qfalse; + } + ++VALUE ++bdb_ary_delete_assoc(struct ary_st *db_ary, VALUE val) ++{ ++ int i, pos; ++ ++ if (!db_ary->ptr || db_ary->mark) return Qfalse; ++ ++ for (pos = 0; pos < db_ary->len; pos++) { ++ ++ struct bdb_objassoc* assoc = db_ary->ptr[pos]; ++ ++ if (assoc->obj == val) { ++ for (i = pos + 1; i < db_ary->len; i++, pos++) { ++ db_ary->ptr[pos] = db_ary->ptr[i]; ++ } ++ ++ free(assoc); ++ db_ary->len = pos; ++ return Qtrue; ++ } ++ } ++ ++ return Qfalse; ++} ++ + void + bdb_ary_mark(struct ary_st *db_ary) + { +@@ -929,8 +954,10 @@ bdb_i_close(bdb_DB *dbst, int flags) + + Data_Get_Struct(dbst->txn, bdb_TXN, txnst); + opened = bdb_ary_delete(&txnst->db_ary, dbst->ori_val); ++ bdb_ary_delete_assoc(&txnst->db_objassoc_ary, dbst->ori_val); + if (!opened) { + opened = bdb_ary_delete(&txnst->db_assoc, dbst->ori_val); ++ bdb_ary_delete_assoc(&txnst->db_assoc_objassoc_ary, dbst->ori_val); + } + if (opened) { + if (txnst->options & BDB_TXN_COMMIT) { +@@ -948,6 +975,7 @@ bdb_i_close(bdb_DB *dbst, int flags) + if (dbst->env && RBASIC(dbst->env)->flags) { + Data_Get_Struct(dbst->env, bdb_ENV, envst); + bdb_ary_delete(&envst->db_ary, dbst->ori_val); ++ bdb_ary_delete_assoc(&envst->db_objassoc_ary, dbst->ori_val); + } + if (!(dbst->options & BDB_NOT_OPEN)) { + dbst->dbp->close(dbst->dbp, flags); +@@ -967,10 +995,29 @@ bdb_local_aref() + return obj; + } + ++static void ++bdb_i_internal_close(bdb_DB *dbst, int flags, bdb_ENV *envst) ++{ ++ //bdb_ENV *envst; ++ ++ if (dbst->dbp) { ++ if (dbst->env && RBASIC(dbst->env)->flags) { ++ //Data_Get_Struct(dbst->env, bdb_ENV, envst); ++ bdb_ary_delete(&envst->db_ary, dbst->ori_val); ++ bdb_ary_delete_assoc(&envst->db_objassoc_ary, dbst->ori_val); ++ } ++ if (!(dbst->options & BDB_NOT_OPEN)) { ++ dbst->dbp->close(dbst->dbp, flags); ++ } ++ } ++ dbst->dbp = NULL; ++} ++ + static VALUE + i_close(bdb_DB *dbst) + { +- bdb_i_close(dbst, 0); ++ //bdb_i_close(dbst, 0); ++ bdb_i_internal_close(dbst, 0, dbst->env_ptr); + return Qnil; + } + +@@ -1098,6 +1145,18 @@ bdb_close(int argc, VALUE *argv, VALUE o + return Qnil; + } + ++VALUE ++bdb_internal_close(bdb_DB *dbst, bdb_ENV *envst) ++{ ++ int flags = 0; ++ ++ if (dbst->dbp != NULL) { ++ bdb_i_internal_close(dbst, flags, envst); ++ } ++ ++ return Qnil; ++} ++ + #if ! HAVE_ST_DB_BTREE_STAT_BT_NKEYS + + static long +@@ -1211,6 +1270,17 @@ bdb_recno_length(obj) + return hash; + } + ++struct bdb_objassoc* create_assoc(VALUE obj, void* obj_ptr, enum BDB_OBJ_TYPE obj_type) ++{ ++ struct bdb_objassoc *assoc = ALLOC(struct bdb_objassoc); ++ ++ assoc->obj = obj; ++ assoc->obj_ptr = obj_ptr; ++ assoc->obj_type = obj_type; ++ ++ return assoc; ++} ++ + static VALUE + bdb_s_new(int argc, VALUE *argv, VALUE obj) + { +@@ -1236,6 +1306,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o + Data_Get_Struct(v, bdb_TXN, txnst); + dbst->txn = v; + dbst->env = txnst->env; ++ dbst->env_ptr = envst; + Data_Get_Struct(txnst->env, bdb_ENV, envst); + envp = envst->envp; + dbst->options |= envst->options & BDB_NO_THREAD; +@@ -1247,6 +1318,7 @@ bdb_s_new(int argc, VALUE *argv, VALUE o + } + Data_Get_Struct(v, bdb_ENV, envst); + dbst->env = v; ++ dbst->env_ptr = envst; + envp = envst->envp; + dbst->options |= envst->options & BDB_NO_THREAD; + dbst->marshal = envst->marshal; +@@ -1292,9 +1364,11 @@ bdb_s_new(int argc, VALUE *argv, VALUE o + rb_obj_call_init(res, argc, argv); + if (txnst) { + bdb_ary_push(&txnst->db_ary, res); ++ bdb_ary_push(&txnst->db_objassoc_ary, (VALUE)create_assoc(res, dbst, BDB_OBJ_DB)); + } + else if (envst) { + bdb_ary_push(&envst->db_ary, res); ++ bdb_ary_push(&envst->db_objassoc_ary, (VALUE)create_assoc(res, dbst, BDB_OBJ_DB)); + } + return res; + } +--- a/src/env.c ++++ b/src/env.c +@@ -1080,6 +1080,11 @@ bdb_final(bdb_ENV *envst) + envst->db_ary.total = envst->db_ary.len = 0; + envst->db_ary.ptr = 0; + free(ary); ++ ++ envst->db_objassoc_ary.mark = Qfalse; ++ envst->db_objassoc_ary.total = envst->db_objassoc_ary.len = 0; ++ free(envst->db_objassoc_ary.ptr); ++ envst->db_objassoc_ary.ptr = 0; + } + if (envst->envp) { + if (!(envst->options & BDB_ENV_NOT_OPEN)) { +@@ -1112,7 +1117,75 @@ bdb_final(bdb_ENV *envst) + static void + bdb_env_free(bdb_ENV *envst) + { +- bdb_final(envst); ++ //bdb_final(envst); ++ ++ VALUE *ary; ++ int i; ++ ++ ary = envst->db_ary.ptr; ++ if (ary) { ++ envst->db_ary.mark = Qtrue; ++ envst->db_objassoc_ary.mark = Qtrue; ++ for (i = 0; i < envst->db_ary.len; i++) { ++ /*if (rb_respond_to(ary[i], rb_intern("close"))) { ++ bdb_protect_close(ary[i]); ++ }*/ ++ //if(i < envst->db_ptr_ary.len) ++ ++ struct bdb_objassoc* assoc = envst->db_objassoc_ary.ptr[i]; ++ ++ switch (assoc->obj_type) { ++ case BDB_OBJ_DB: ++ bdb_internal_close(assoc->obj_ptr, envst); ++ break; ++ ++ case BDB_OBJ_TX: ++ txn_free(assoc->obj_ptr); ++ break; ++ ++ case BDB_OBJ_LOCK: ++ lockid_free(assoc->obj_ptr); ++ break; ++ } ++ ++ } ++ envst->db_ary.mark = Qfalse; ++ envst->db_ary.total = envst->db_ary.len = 0; ++ envst->db_ary.ptr = 0; ++ free(ary); ++ ++ envst->db_objassoc_ary.mark = Qfalse; ++ envst->db_objassoc_ary.total = envst->db_objassoc_ary.len = 0; ++ free(envst->db_objassoc_ary.ptr); ++ envst->db_objassoc_ary.ptr = 0; ++ } ++ if (envst->envp) { ++ if (!(envst->options & BDB_ENV_NOT_OPEN)) { ++#if HAVE_ST_DB_ENV_CLOSE ++ envst->envp->close(envst->envp, 0); ++#else ++ db_appexit(envst->envp); ++ free(envst->envp); ++#endif ++ } ++ envst->envp = NULL; ++ } ++#if BDB_NEED_ENV_CURRENT ++ { ++ VALUE obj; ++ bdb_ENV *thst; ++ int status = 0; ++ ++ obj = bdb_env_aref(); ++ if (!status && !NIL_P(obj)) { ++ Data_Get_Struct(obj, bdb_ENV, thst); ++ if (thst == envst) { ++ rb_thread_local_aset(rb_thread_current(), bdb_id_current_env, Qnil); ++ } ++ } ++ } ++#endif ++ + free(envst); + } + +--- a/src/lock.c ++++ b/src/lock.c +@@ -12,21 +12,30 @@ bdb_clean_env(VALUE env, VALUE obj) + bdb_ENV *envst; + Data_Get_Struct(env, bdb_ENV, envst); + bdb_ary_delete(&envst->db_ary, obj); ++ bdb_ary_delete_assoc(&envst->db_objassoc_ary, obj); + } +- +-static void ++ ++void + lockid_free( bdb_LOCKID *dblockid) + { + #if HAVE_ST_DB_ENV_LOCK_ID_FREE + bdb_ENV *envst; + +- bdb_clean_env(dblockid->env, dblockid->self); +- Data_Get_Struct(dblockid->env, bdb_ENV, envst); +- if (envst->envp) { +- envst->envp->lock_id_free(envst->envp, dblockid->lock); ++ if (dblockid->env_ptr != NULL) { ++ envst = dblockid->env_ptr; ++ ++ //bdb_clean_env(dblockid->env, dblockid->self); ++ bdb_ary_delete(&envst->db_ary, dblockid->self); ++ bdb_ary_delete_assoc(&envst->db_objassoc_ary, dblockid->self); ++ ++ //Data_Get_Struct(dblockid->env, bdb_ENV, envst); ++ if (envst->envp) { ++ envst->envp->lock_id_free(envst->envp, dblockid->lock); ++ } ++ #endif ++ free(dblockid); ++ dblockid->env_ptr = NULL; + } +-#endif +- free(dblockid); + } + + static VALUE +@@ -52,8 +61,10 @@ bdb_env_lockid(VALUE obj) + dblockid->lock = idp; + dblockid->env = obj; + dblockid->self = a; ++ dblockid->env_ptr = envst; + #if HAVE_ST_DB_ENV_LOCK_ID + bdb_ary_push(&envst->db_ary, a); ++ bdb_ary_push(&envst->db_objassoc_ary, (VALUE)create_assoc(a, dblockid, BDB_OBJ_LOCK)); + #endif + return a; + } +--- a/src/log.c ++++ b/src/log.c +@@ -387,6 +387,7 @@ bdb_log_cursor(VALUE lsn) + GetEnvDB(lsnst->env, envst); + bdb_test_error(envst->envp->log_cursor(envst->envp, &lsnst->cursor, 0)); + bdb_ary_push(&envst->db_ary, lsn); ++ //bdb_ary_push(&envst->db_objassoc_ary, (VALUE)create_assoc(lsn, lsnst, BDB_OBJ_LOG)); + } + return lsn; + } +--- a/src/transaction.c ++++ b/src/transaction.c +@@ -50,7 +50,68 @@ clean_ary(bdb_TXN *txnst, VALUE result) + } + } + +-static VALUE ++static VALUE ++bdb__txn__internal_close(VALUE obj, VALUE commit, VALUE real) ++{ ++ bdb_DB *dbst, *dbst1; ++ ++ if (!real) { ++ Data_Get_Struct(obj, bdb_DB, dbst); ++ dbst->dbp = NULL; ++ } ++ else { ++ if (commit) { ++ Data_Get_Struct(obj, bdb_DB, dbst); ++ if (dbst->orig) { ++ Data_Get_Struct(dbst->orig, bdb_DB, dbst1); ++ dbst1->len = dbst->len; ++ } ++ } ++// bdb_close(0, 0, obj); ++ } ++ return Qnil; ++} ++ ++static void ++clean_ary_internal(bdb_TXN *txnst, VALUE result) ++{ ++ VALUE *ary, tmp[3]; ++ int i, len; ++ ++ tmp[0] = Qnil; ++ tmp[1] = result; ++ tmp[2] = Qtrue; ++ if (txnst->db_ary.ptr) { ++ txnst->db_ary.mark = Qtrue; ++ ary = txnst->db_ary.ptr; ++ len = txnst->db_ary.len; ++ ++ for (i = 0; i < len; i++) { ++ tmp[0] = ary[i]; ++ bdb__txn__internal_close(txnst->db_objassoc_ary.ptr[i], result, Qtrue); //txn_close_i(tmp); ++ } ++ txnst->db_ary.mark = Qfalse; ++ txnst->db_ary.ptr = 0; ++ txnst->db_ary.total = txnst->db_ary.len = 0; ++ free(ary); ++ } ++ tmp[2] = Qfalse; ++ if (txnst->db_assoc.ptr) { ++ txnst->db_assoc.mark = Qtrue; ++ ary = txnst->db_assoc.ptr; ++ len = txnst->db_assoc.len; ++ for (i = 0; i < len; i++) { ++ tmp[0] = ary[i]; ++ bdb__txn__internal_close(txnst->db_objassoc_ary.ptr[i], result, Qtrue); //txn_close_i(tmp); ++ } ++ txnst->db_assoc.mark = Qfalse; ++ txnst->db_assoc.ptr = 0; ++ txnst->db_assoc.total = txnst->db_assoc.len = 0; ++ free(ary); ++ } ++} ++ ++VALUE + txn_free(bdb_TXN *txnst) + { + if (txnst->txnid && txnst->parent == NULL) { +@@ -72,7 +133,7 @@ txn_free(bdb_TXN *txnst) + if (txnst->txn_cxx) + free(txnst->txn_cxx); + #endif +- clean_ary(txnst, Qfalse); ++ clean_ary_internal(txnst, Qfalse); + return Qnil; + } + +@@ -107,6 +168,7 @@ bdb_txn_assoc(int argc, VALUE *argv, VAL + for (i = 0; i < argc; i++) { + a = rb_funcall(argv[i], rb_intern("__txn_dup__"), 1, obj); + bdb_ary_push(&txnst->db_assoc, a); ++ bdb_ary_push(&txnst->db_assoc_objassoc_ary, (VALUE)create_assoc(a, txnst, BDB_OBJ_TX)); + rb_ary_push(ary, a); + } + switch (RARRAY_LEN(ary)) { +@@ -386,6 +448,7 @@ bdb_env_rslbl_begin(VALUE origin, int ar + txnst->options = envst->options & BDB_INIT_LOCK; + txnst->mutex = opt.mutex; + bdb_ary_unshift(&envst->db_ary, txnv); ++ bdb_ary_unshift(&envst->db_objassoc_ary, (VALUE)create_assoc(txnv, txnst, BDB_OBJ_TX)); + if (commit) { + txnst->options |= BDB_TXN_COMMIT; + } diff -Nru ruby-bdb-0.6.5/debian/patches/fix-inheritance ruby-bdb-0.6.6/debian/patches/fix-inheritance --- ruby-bdb-0.6.5/debian/patches/fix-inheritance 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/fix-inheritance 2014-03-28 01:06:49.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Fix inheritance of some helper methods + +Author: David Suárez +Last-Update: 2014-03-12 + +--- ruby-bdb-0.6.6.orig/src/common.c ++++ ruby-bdb-0.6.6/src/common.c +@@ -1277,16 +1277,16 @@ bdb_s_new(int argc, VALUE *argv, VALUE o + dbst->marshal = obj; + dbst->options |= BDB_MARSHAL; + } +- if (rb_method_boundp(obj, rb_intern("bdb_store_key"), 0) == Qtrue) { ++ if (rb_method_boundp(obj, rb_intern("bdb_store_key"), 0) == 1) { + dbst->filter[FILTER_KEY] = INT2FIX(rb_intern("bdb_store_key")); + } +- if (rb_method_boundp(obj, rb_intern("bdb_fetch_key"), 0) == Qtrue) { ++ if (rb_method_boundp(obj, rb_intern("bdb_fetch_key"), 0) == 1) { + dbst->filter[2 + FILTER_KEY] = INT2FIX(rb_intern("bdb_fetch_key")); + } +- if (rb_method_boundp(obj, rb_intern("bdb_store_value"), 0) == Qtrue) { ++ if (rb_method_boundp(obj, rb_intern("bdb_store_value"), 0) == 1) { + dbst->filter[FILTER_VALUE] = INT2FIX(rb_intern("bdb_store_value")); + } +- if (rb_method_boundp(obj, rb_intern("bdb_fetch_value"), 0) == Qtrue) { ++ if (rb_method_boundp(obj, rb_intern("bdb_fetch_value"), 0) == 1) { + dbst->filter[2 + FILTER_VALUE] = INT2FIX(rb_intern("bdb_fetch_value")); + } + rb_obj_call_init(res, argc, argv); diff -Nru ruby-bdb-0.6.5/debian/patches/remove_constants_safely ruby-bdb-0.6.6/debian/patches/remove_constants_safely --- ruby-bdb-0.6.5/debian/patches/remove_constants_safely 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/remove_constants_safely 2014-03-28 01:06:49.000000000 +0000 @@ -0,0 +1,50 @@ +Author: Gunnar Wolf +Forwarded: no +Last-Update: 2014-01-17 +Description: Fixes FTBFS constant CONFTEST_C was not yet defined + +Index: ruby-bdb/bdbxml2/features.rb +=================================================================== +--- ruby-bdb.orig/bdbxml2/features.rb 2014-01-17 13:51:45.000000000 -0600 ++++ ruby-bdb/bdbxml2/features.rb 2014-01-17 13:55:48.000000000 -0600 +@@ -1,5 +1,9 @@ + class Object +- remove_const('CONFTEST_C') ++ begin ++ remove_const('CONFTEST_C') ++ rescue NameError ++ # CONFTEST_C was not yet defined, do nothing ++ end + end + + CONFTEST_C = 'conftest.cxx' +Index: ruby-bdb/src/features.rb +=================================================================== +--- ruby-bdb.orig/src/features.rb 2014-01-17 13:51:45.000000000 -0600 ++++ ruby-bdb/src/features.rb 2014-01-17 13:55:40.000000000 -0600 +@@ -813,7 +813,11 @@ + begin + conftest = CONFTEST_C.dup + class Object +- remove_const('CONFTEST_C') ++ begin ++ remove_const('CONFTEST_C') ++ rescue NameError ++ # CONFTEST_C was not yet defined, do nothing ++ end + end + + CONFTEST_C = 'conftest.cxx' +@@ -878,7 +882,11 @@ + + ensure + class Object +- remove_const('CONFTEST_C') ++ begin ++ remove_const('CONFTEST_C') ++ rescue NameError ++ # CONFTEST_C was not yet defined, do nothing ++ end + end + + CONFTEST_C = conftest diff -Nru ruby-bdb-0.6.5/debian/patches/remove-src-dir-from-tests-load-path ruby-bdb-0.6.6/debian/patches/remove-src-dir-from-tests-load-path --- ruby-bdb-0.6.5/debian/patches/remove-src-dir-from-tests-load-path 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/remove-src-dir-from-tests-load-path 2014-03-28 01:06:49.000000000 +0000 @@ -0,0 +1,79 @@ +Description: Remove src dir from tests load path + This fixes segfault on tests, due to the wrong dinamic library version + getting loaded. + +Author: David Suárez +Last-Update: 2014-02-30 + +--- ruby-bdb-0.6.6.orig/tests/btree.rb ++++ ruby-bdb-0.6.6/tests/btree.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/hash.rb ++++ ruby-bdb-0.6.6/tests/hash.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/lock.rb ++++ ruby-bdb-0.6.6/tests/lock.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/log.rb ++++ ruby-bdb-0.6.6/tests/log.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/marshal.rb ++++ ruby-bdb-0.6.6/tests/marshal.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/queue.rb ++++ ruby-bdb-0.6.6/tests/queue.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + + print "\nVERSION of BDB is #{BDB::VERSION}\n" +--- ruby-bdb-0.6.6.orig/tests/recno.rb ++++ ruby-bdb-0.6.6/tests/recno.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift *%w{../src src tests} ++$LOAD_PATH.unshift *%w{tests} + require 'bdb' + require 'runit_' + +--- ruby-bdb-0.6.6.orig/tests/recnum.rb ++++ ruby-bdb-0.6.6/tests/recnum.rb +@@ -1,5 +1,5 @@ + #!/usr/bin/ruby +-$LOAD_PATH.unshift(*%w{../src src tests}) ++$LOAD_PATH.unshift(*%w{tests}) + require 'bdb' + require 'runit_' + diff -Nru ruby-bdb-0.6.5/debian/patches/series ruby-bdb-0.6.6/debian/patches/series --- ruby-bdb-0.6.5/debian/patches/series 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/series 2014-03-28 01:06:49.000000000 +0000 @@ -1,5 +1,10 @@ -build-against-libdb.patch +#build-against-libdb.patch doc-in-a-single-dir.patch dont-check-patch-level.patch fail-make-test-if-tests-fail.patch add-support-for-libdb_version_5_and_higher.patch +remove_constants_safely +fix-inheritance +remove-src-dir-from-tests-load-path +dont-rely-on-ruby-objects-to-accommodate-c-data +use-same-encoding-for-dup-test diff -Nru ruby-bdb-0.6.5/debian/patches/use-same-encoding-for-dup-test ruby-bdb-0.6.6/debian/patches/use-same-encoding-for-dup-test --- ruby-bdb-0.6.5/debian/patches/use-same-encoding-for-dup-test 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/debian/patches/use-same-encoding-for-dup-test 2014-03-28 01:06:49.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Use the same encoding for key index on count test + +Author: David Suárez +Last-Update: 2014-03-13 + +--- ruby-bdb-0.6.6.orig/tests/marshal.rb ++++ ruby-bdb-0.6.6/tests/marshal.rb +@@ -113,16 +113,16 @@ class TestBtree < Inh::TestCase + ind = 0 + array.each do |arr| + arr.each do |i| +- assert_equal(i, $bdb[ind.to_s] = i, "") ++ assert_equal(i, $bdb[ind.to_s.encode("US-ASCII")] = i, "") + end + ind += 1 + end + if BDB::VERSION_MAJOR > 2 || (BDB::VERSION_MAJOR == 2 && BDB::VERSION_MINOR >= 6) +- assert_equal(4, $bdb.count("0"), "") +- assert_equal(3, $bdb.count("1"), "") +- assert_equal(2, $bdb.count("2"), "") +- assert_equal(1, $bdb.count("3"), "") +- assert_equal(0, $bdb.count("4"), "") ++ assert_equal(4, $bdb.count("0".encode("US-ASCII")), "") ++ assert_equal(3, $bdb.count("1".encode("US-ASCII")), "") ++ assert_equal(2, $bdb.count("2".encode("US-ASCII")), "") ++ assert_equal(1, $bdb.count("3".encode("US-ASCII")), "") ++ assert_equal(0, $bdb.count("4".encode("US-ASCII")), "") + array.size.times do |i| + $bdb.get_dup(i.to_s) do |val| + assert(array[i].index(val) != nil) diff -Nru ruby-bdb-0.6.5/debian/ruby-bdb.docs ruby-bdb-0.6.6/debian/ruby-bdb.docs --- ruby-bdb-0.6.5/debian/ruby-bdb.docs 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/ruby-bdb.docs 2014-03-28 01:06:49.000000000 +0000 @@ -1,2 +1 @@ -bdb.html -docs +rdoc diff -Nru ruby-bdb-0.6.5/debian/ruby-tests.rb ruby-bdb-0.6.6/debian/ruby-tests.rb --- ruby-bdb-0.6.5/debian/ruby-tests.rb 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/ruby-tests.rb 2014-03-28 01:06:49.000000000 +0000 @@ -3,5 +3,6 @@ Dir.foreach('tests') do |test_file| next if /^\./ =~ test_file || /(_\.rb|~)$/ =~ test_file next if FileTest.directory?(test_file) - system("#{ENV['RUBY_TEST_BIN']} tests/#{test_file}") || exit($?) + + system("#{ENV['RUBY_TEST_BIN']} tests/#{test_file}") || exit(1) end diff -Nru ruby-bdb-0.6.5/debian/rules ruby-bdb-0.6.6/debian/rules --- ruby-bdb-0.6.5/debian/rules 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/rules 2014-03-28 01:06:49.000000000 +0000 @@ -15,13 +15,25 @@ dh $@ --buildsystem=ruby --with ruby override_dh_installdocs: - dh_installdocs -O--buildsystem=ruby -X*.rd -X*.rb + rdoc --op rdoc --main README.en \ + --title "Interface to Berkeley DB" \ + src doc README.en + $(RM) $(CURDIR)/debian/ruby-bdb/usr/share/doc/ruby-bdb/rdoc/js/jquery.js + dh_installdocs + +override_dh_link: + # link to jquery.js + dh_link --package=ruby-bdb usr/share/javascript/jquery/jquery.js \ + usr/share/doc/ruby-bdb/rdoc/js/jquery.js override_dh_clean: dh_clean + $(RM) src/bdb_features.h + $(RM) -R tmp + $(RM) -R rdoc + # This package is maintained in a Git repository, and empty # directories are not tracked by Git. In order to run the test # suite, create the needed tmp/ directories if they are not # present - mkdir -p bdbxml2/tests/tmp bdbxml2/examples/tmp bdbxml2/tmp tests/tmp \ - bdbxml1/tests/tmp bdbxml1/examples/tmp bdbxml1/tmp examples/tmp tmp + mkdir tmp diff -Nru ruby-bdb-0.6.5/debian/watch ruby-bdb-0.6.6/debian/watch --- ruby-bdb-0.6.5/debian/watch 2011-06-01 15:21:20.000000000 +0000 +++ ruby-bdb-0.6.6/debian/watch 2014-03-28 01:06:49.000000000 +0000 @@ -1,2 +1,3 @@ version=3 -http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/bdb .*/bdb-(.*).tar.gz +opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ +https://github.com/knu/ruby-bdb/tags .*/v(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) diff -Nru ruby-bdb-0.6.5/docs/arraylike.html ruby-bdb-0.6.6/docs/arraylike.html --- ruby-bdb-0.6.5/docs/arraylike.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/arraylike.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,199 +0,0 @@ - - - - -docs/arraylike.rd - - -

Acces Methods

-

These are the methods for BDB::Recnum

-

Don't mix these methods with methods of BDB::Cursor

-

Class Methods

-
-
open(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
create(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
new(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
-

open the database

-
BDB::Recnum.open(name, subname, flags, mode)
-
-is equivalent to
-
-BDB::Recno.open(name, subname, flags, mode,
-                "set_flags" => BDB::RENUMBER,
-                "set_array_base" => 0)
-
remove(name, subname = nil)
-
db_remove(name, subname = nil)
-
unlink(name, subname = nil)
-
-

Removes the database (or subdatabase) represented by the -name and subname combination.

-

If no subdatabase is specified, the physical file represented by name -is removed, incidentally removing all subdatabases that it contained.

-
upgrade(name)
-
db_upgrade(name)
-
-Upgrade the database
-
-

Methods

-

All this methods has the same syntax than for the class Array

-
-
self[nth]
-
-retrieves the nth item from an array. Index starts from zero. -If index is the negative, counts backward from the end of the array. -The index of the last element is -1. Returns nil, if the nth -element is not exist in the array.
-
self[start..end]
-
-returns an array containing the objects from start to end, -including both ends. if end is larger than the length of the array, -it will be rounded to the length. If start is out of an array -range , returns nil. -And if start is larger than end with in array range, returns -empty array ([]).
-
self[start, length]
-
-returns an array containing length items from start. -Returns nil if length is negative.
-
self[nth] = val
-
-changes the nth element of the array into val. -If nth is larger than array length, the array shall be extended -automatically. Extended region shall be initialized by nil.
-
self[start..end] = val
-
-replace the items from start to end with val. -If val is not an array, the type of val will be converted -into the Array using to_a method.
-
self[start, length] = val
-
-replace the length items from start with val. -If val is not an array, the type of val will be converted -into the Array using to_a.
-
self + other
-
-concatenation
-
self * times
-
-repetition
-
self - other
-
-substraction
-
self & other
-
-returns a new array which contains elements belong to both elements.
-
self | other
-
-join
-
self << obj
-
-append a new item with value obj. Return self
-
self <=> other
-
-comparison : return -1, 0 or 1
-
clear
-
-delete all elements
-
collect {|item| ..}
-
-Returns a new array by invoking block once for every element, -passing each element as a parameter to block. The result of block -is used as the given element
-
collect! {|item| ..}
-
-invokes block once for each element of db, replacing the element -with the value returned by block.
-
concat(other)
-
-append other to the end
-
delete(val)
-
-delete the item which matches to val
-
delete_at(pos)
-
-delete the item at pos
-
delete_if {|x| ...}
-
-delete the item if the block return true
-
reject!{|x|...}
-
-delete the item if the block return true
-
each {|x| ...}
-
-iterate over each item
-
each_index {|i| ...}
-
-iterate over each index
-
empty?
-
-return true if the db file is empty
-
fill(val)
-
-set the entire db with val
-
fill(val, start[, length])
-
-fill the db with val from start
-
fill(val, start..end)
-
-set the db with val from start to end
-
include?(val)
-
-returns true if the given val is present
-
index(val)
-
-returns the index of the item which equals to val. -If no item found, returns nil
-
indexes(index_1,..., index_n)
-
-returns an array consisting of elements at the given indices
-
indices(index_1,..., index_n)
-
-returns an array consisting of elements at the given indices
-
join([sep])
-
-returns a string created by converting each element to a string
-
length
-
size
-
-return the number of elements of the db file
-
nitems
-
-return the number of non-nil elements of the db file
-
pop
-
-pops and returns the last value
-
push(obj...)
-
-appends obj
-
replace(other)
-
-replaces the contents of the db file with the contents of other
-
reverse
-
-returns the array of the items in reverse order
-
reverse!
-
-replaces the items in reverse order.
-
reverse_each {|x| ...}
-
-iterate over each item in reverse order
-
rindex(val)
-
-returns the index of the last item which verify item == val
-
shift
-
-remove and return the first element
-
to_a
-
to_ary
-
-return an Array with all elements
-
unshift(obj)
-
-insert obj to the front of the db file
-
- - - diff -Nru ruby-bdb-0.6.5/docs/cursor.html ruby-bdb-0.6.6/docs/cursor.html --- ruby-bdb-0.6.5/docs/cursor.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/cursor.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ - - - - -docs/cursor.rd - - -

Cursor operation

-

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.

-

See also iterators in Acces Methods

-

Methods

-
-
close()
-
c_close()
-
-Discards the cursor.
-
count()
-
c_count()
-
-Return the count of duplicate
-
current()
-
c_current()
-
-Same than get(BDB::CURRENT)
-
del()
-
delete()
-
c_del()
-
-Deletes the key/data pair currently referenced by the cursor.
-
dup(flags = 0)
-
clone(flags = 0)
-
c_dup(flags = 0)
-
c_clone(flags = 0)
-
-

Creates new cursor that uses the same transaction and locker ID as -the original cursor. This is useful when an application is using -locking and requires two or more cursors in the same thread of -control.

-

flags can have the value BDB::DB_POSITION, in this case the -newly created cursor is initialized to reference the same position in -the database as the original cursor and hold the same locks.

-
first()
-
c_first()
-
-Same than get(BDB::FIRST)
-
get(flags, key = nil, value = nil)
-
c_get(flags, key = nil, value = nil)
-
-

Retrieve key/data pair from the database

-

See the description of c_get in the Berkeley distribution -for the different values of the flags parameter.

-

key must be given if the flags parameter is -BDB::SET | BDB::SET_RANGE | BDB::SET_RECNO

-

key and value must be specified for BDB::GET_BOTH

-
last()
-
c_last()
-
-Same than get(BDB::LAST)
-
next()
-
c_next()
-
-Same than get(BDB::NEXT)
-
pget(flags, key = nil, value = nil)
-
c_pget(flags, key = nil, value = nil)
-
-Retrieve key/primary key/data pair from the database
-
prev()
-
c_prev()
-
-Same than get(BDB::PREV)
-
put(flags, value)
-
c_put(flags, value)
-
-

Stores data value into the database.

-

See the description of c_put in the Berkeley distribution -for the different values of the flags parameter.

-
put(flags, key, value)
-
c_put(flags, key, value)
-
-

Stores key/data pairs into the database (only for Btree and Hash -access methods)

-

flags must have the value BDB::KEYFIRST or -BDB::KEYLAST

-
set(key)
-
c_set(key)
-
set_range(key)
-
c_set_range(key)
-
set_recno(key)
-
c_set_recno(key)
-
-Same than get with the flags BDB::SET or BDB::SET_RANGE -or BDB::SET_RECNO
-
- - - diff -Nru ruby-bdb-0.6.5/docs/env.html ruby-bdb-0.6.6/docs/env.html --- ruby-bdb-0.6.5/docs/env.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/env.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,441 +0,0 @@ - - - - -docs/env.rd - - -

BDB::Env

-

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.

-

The simplest way to administer a Berkeley DB application environment -is to create a single home directory that stores the files for the -applications that will share the environment. The environment home -directory must be created before any Berkeley DB applications are run. -Berkeley DB itself never creates the environment home directory. The -environment can then be identified by the name of that directory.

- -

Class Methods

-
-
open(home, flags = 0, mode = 0, options = {})
-
create(home, flags = 0, mode = 0, options = {})
-
new(home, flags = 0, mode = 0, options = {})
-
-open the Berkeley DB environment -
-
home
-
-If this argument is non-NULL, its value may be used as the -database home, and files named relative to its path. -
-
mode
-
-mode for creation (see chmod(2)) -
-
flags
-
-must be set to 0 or by OR'ing with -
-
BDB::INIT_CDB Initialize locking.
-
BDB::INIT_LOCK Initialize the locking subsystem.
-
BDB::INIT_LOG Initialize the logging subsystem.
-
BDB::INIT_MPOOL Initialize the shared memory buffer pool subsystem.
-
BDB::INIT_TXN Initialize the transaction subsystem.
-
BDB::INIT_TRANSACTION
-
-Equivalent to DB_INIT_LOCK | DB_INIT_MPOOL | DB_INIT_TXN | DB_INIT_LOG -
-
BDB::RECOVER
-
-Run normal recovery on this environment before opening it for normal -use. If this flag is set, the DB_CREATE flag must also be set since -the regions will be removed and recreated. -
-
BDB::RECOVER_FATAL
-
-Run catastrophic recovery on this environment before opening -it for normal use. If this flag is set, the DB_CREATE flag -must also be set since the regions will be removed and recreated. -
-
BDB::USE_ENVIRON
-
-The Berkeley DB process' environment may be permitted to -specify information to be used when naming files -
-
BDB::USE_ENVIRON_ROOT
-
-The Berkeley DB process' environment may be permitted to -specify information to be used when naming files; -if the DB_USE_ENVIRON_ROOT flag is set, environment -information will be used for file naming only for users with -appropriate permissions -
-
BDB::CREATE
-
-Cause Berkeley DB subsystems to create any underlying -files, as necessary. -
-
BDB::LOCKDOWN
-
-Lock shared Berkeley DB environment files and memory mapped -databases into memory. -
-
BDB::NOMMAP
-
-Always copy read-only database files in this environment -into the local cache instead of potentially mapping -them into process memory -
-
BDB::PRIVATE
-
-Specify that the environment will only be accessed by a -single process -
-
BDB::SYSTEM_MEM
-
-Allocate memory from system shared memory instead of from -memory backed by the filesystem. -
-
BDB::TXN_NOSYNC
-
-Do not synchronously flush the log on transaction commit or -prepare. This means that transactions exhibit the -ACI (atomicity, consistency and isolation) properties, but not -D (durability), i.e., database integrity will -be maintained but it is possible that some number of the -most recently committed transactions may be undone -during recovery instead of being redone. -
-
BDB::CDB_ALLDB
-
-For Berkeley DB Concurrent Data Store applications, perform -locking on an environment-wide basis rather than per-database. -
-
-
-
options
-
-

Hash, Possible options are (see the documentation of Berkeley DB -for more informations)

-
-
set_app_dispatch : configure application recovery interface (DB >= 4.1)
-
set_cachesize : set the database cache size
-
set_data_dir : set the environment data directory (DB >= 3)
-
set_encrypt : set the environment cryptographic key (DB >= 4.1)
-
set_feedback : set feedback callback (DB >= 3)
-
set_flags : environment configuration (DB >= 3.2)
-
set_lg_bsize : set log buffer size (DB >= 3)
-
set_lg_dir : set the environment logging directory (DB >= 3)
-
set_lg_max : set log file size
-
set_lg_regionmax : set logging region size (DB >= 3)
-
set_lk_conflicts : set lock conflicts matrix (DB >= 3)
-
set_lk_detect : set automatic deadlock detection
-
set_lk_max_lockers : set maximum number of lockers
-
set_lk_max_locks : set maximum number of locks
-
set_lk_max_objects : set maximum number of lock objects
-
set_rep_transport : configure replication transport (DB >= 4)
-
set_rep_limit : limit data sent in response to a single message (DB >= 4.1)
-
set_rep_nsites : configure replication group site count (DB >= 4.5)
-
set_rep_priority : configure replication site priority (DB >= 4.5)
-
set_rep_config : configure the replication subsystem (DB >= 4.5)
-
set_rep_timeout : configure replication timeouts (DB >= 4.5)
-
set_rpc_server : establish an RPC server connection (DB >= 3.1)
-
set_tas_spins : set the number of test-and-set spins (DB >= 3)
-
set_tmp_dir : set the environment temporary file directory (DB >= 3)
-
set_timeout : set lock and transaction timeout (DB >= 4)
-
set_tx_max : set maximum number of transactions (DB >= 3)
-
set_tx_timestamp : set recovery timestamp (DB >= 3.1)
-
set_verbose : set verbose messages
-
set_verb_chkpoint :display checkpoint location information when searching the log for checkpoints. (DB >= 3)
-
set_verb_deadlock : display additional information when doing deadlock detection. (DB >= 3)
-
set_verb_recovery : display additional information when performing recovery. (DB >= 3)
-
set_verb_replication : display additional information when processing replication messages. (DB >= 4)
-
set_verb_waitsfor : display the waits-for table when doing deadlock detection. (DB >= 3)
-
-

Proc given to set_feedback, set_app_dispatch and -set_rep_transport can be also specified as a method -(replace the prefix set_ with bdb_)

-

For bdb_rep_transport the constant ENVID must be defined

-

The constant BDB_ENCRYPT can be used to replace set_encrypt

-
-
-
remove()
-
unlink()
-
-remove the environnement
-
-

Methods

-
-
close()
-
-close the environnement
-
dbremove(file, database = nil, flags = 0)
-
-

only with BDB::VERSION_MAJOR == 4 && BDB::VERSION_MINOR >= 1

-

remove the database specified by file and database. If no -database is nil, the underlying file represented by -file is removed, incidentally removing all databases -that it contained.

-

The flags value must be set to 0 or BDB::AUTO_COMMIT

-
dbrename(file, database, newname, flags = 0)
-
-

only with BDB::VERSION_MAJOR == 4 && BDB::VERSION_MINOR >= 1

-

rename the database specified by file and database to -newname. If database is nil, the underlying file -represented by file is renamed, incidentally renaming all databases -that it contained.

-

The flags value must be set to 0 or BDB::AUTO_COMMIT

-
feedback=(proc)
-
-monitor the progress of some operations
-
home()
-
-return the name of the directory
-
lock()
-
lock_id()
-
-Acquire a locker ID
-
lock_detect(type, flags = 0)
-
-

The lock_detect function runs one iteration of the deadlock -detector. The deadlock detector traverses the lock table, and for each -deadlock it finds, marks one of the participating transactions for -abort.

-

type can have one the value BDB::LOCK_OLDEST, -BDB::LOCK_RANDOM or BDB::LOCK_YOUNGUEST

-

flags can have the value BDB::LOCK_CONFLICT, in this case -the deadlock detector is run only if a lock conflict has occurred -since the last time that the deadlock detector was run.

-

return the number of transactions aborted by the lock_detect function -if BDB::VERSION_MAJOR >= 3 or zero

-
lock_stat()
-
-Return lock subsystem statistics
-
log_archive(flags = 0)
-
-

The log_archive function return an array of log or database file names.

-

flags value must be set to 0 or the value BDB::ARCH_DATA, -BDB::ARCH_ABS, BDB::ARCH_LOG

-
log_checkpoint(string)
-
-same as log_put(string, BDB::CHECKPOINT)
-
log_curlsn(string)
-
-same as log_put(string, BDB::CURLSN)
-
log_each { |string, lsn| ... }
-
-Implement an iterator inside of the log
-
log_flush(string = nil)
-
-

same as log_put(string, BDB::FLUSH)

-

Without argument, garantee that all records are written to the disk

-
log_get(flag)
-
-

The log_get return an array [String, BDB::Lsn] according to -the flag value.

-

flag can has the value BDB::CHECKPOINT, BDB::FIRST, -BDB::LAST, BDB::NEXT, BDB::PREV, BDB::CURRENT

-
log_put(string, flag = 0)
-
-

The log_put function appends records to the log. It return -an object BDB::Lsn

-

flag can have the value BDB::CHECKPOINT, BDB::CURLSN, -BDB::FLUSH

-
log_reverse_each { |string, lsn| ... }
-
-Implement an iterator inside of the log
-
log_stat
-
-return log statistics
-
open_db(type, name = nil, subname = nil, flags = 0, mode = 0)
-
-open the database in the current environment. type must be one of -the constant BDB::BTREE, BDB::HASH, BDB::RECNO, -BDB::QUEUE. See open for other -arguments
-
recover { |txn, id| ... }
-
-

only with BDB::VERSION_MAJOR == 3 && BDB::VERSION_MINOR >= 3

-

iterate over all prepared transactions. The transaction txn -must be made a call to #abort, #commit, #discard

-

id is the global transaction ID for the transaction

-
set_flags(flags, onoff = true)
-
-

only with BDB::VERSION_MAJOR == 3 && BDB::VERSION_MINOR >= 2

-

flags can have the value BDB::CDB_ALLDB, BDB::NOMMAP -BDB::TXN_NOSYNC

-

if onoff is false, the specified flags are cleared

-
begin(flags = 0)
-
txn_begin(flags = 0)
-
begin(flags = 0, db, ...) { |txn, db, ...| ...}
-
-begin a transaction (the transaction manager must be enabled). flags -can have the value DBD::TXN_COMMIT, in this case the transaction -will be commited at end.
-
checkpoint(kbyte, min = 0)
-
txn_checkpoint(kbyte, min = 0)
-
-

The txn_checkpoint function flushes the underlying memory pool, -writes a checkpoint record to the log and then flushes the log.

-

If either kbyte or min is non-zero, the checkpoint is only done -if more than min minutes have passed since the last checkpoint, or if -more than kbyte kilobytes of log data have been written since the last -checkpoint.

-
stat()
-
txn_stat()
-
-Return transaction subsystem statistics
-
repmgr_add_remote(host, port, flag = 0)
-
-

Only for DB >= 4.5

-

Adds a new replication site to the replication manager's list of known sites.

-

Return the environment ID assigned to the remote site

-
repmgr_ack_policy=(policy)
-
repmgr_set_ack_policy(policy)
-
-

Only for DB >= 4.5

-

Specifies how master and client sites will handle acknowledgment of replication -messages which are necessary for "permanent" records.

-

policy must be set to one of the following values -BDB::REPMGR_ACKS_ALL, BDB::REPMGR_ACKS_ALL_PEERS, -BDB::REPMGR_ACKS_NONE, BDB::REPMGR_ACKS_ONE, -BDB::REPMGR_ACKS_ONE_PEER, BDB::REPMGR_ACKS_QUORUM

-
repmgr_ack_policy
-
repmgr_get_ack_policy
-
-

Only for DB >= 4.5

-

Returns the replication manager's client acknowledgment policy.

-
repmgr_site_list
-
-

Only for DB >= 4.5

-

Returns an array with the status of the sites currently known by the -replication manager.

-
repmgr_set_local_site(host, port, flag = 0)
-
-

Only for DB >= 4.5

-

Specifies the host identification string and port number for the local system.

-
repmgr_start(count, flag)
-
-

Only for DB >= 4.5

-

Starts the replication manager.

-
rep_config[]=(which, onoff)
-
-

Only for DB >= 4.5

-

Configures the Berkeley DB replication subsystem.

-

which can have the value BDB::REP_CONF_BULK, -BDB::REP_CONF_DELAYCLIENT, BDB::REP_CONF_NOAUTOINIT, -BDB::REP_CONF_NOWAIT

-

onoff can have the value true or false

-
rep_config?[](which)
-
-

Only for DB >= 4.5

-

Returns true if the specified which parameter is currently set or not.

-
rep_nsites=(sites)
-
-

Only for DB >= 4.5

-

Specifies the total number of sites in a replication group.

-
rep_nsites
-
-

Only for DB >= 4.5

-

Returns the total number of sites in a replication group.

-
rep_priority=(priority)
-
-

Only for DB >= 4.5

-

Specifies the priority in the replication group elections.

-
rep_priority
-
-

Only for DB >= 4.5

-

Returns the database environment priority.

-
rep_timeout[]=(which, timeout)
-
-

Only for DB >= 4.5

-

Specifies the timeout in the replication group elections.

-

which can have the value BDB::REP_ACK_TIMEOUT, -BDB::REP_ELECTION_TIMEOUT, BDB::REP_ELECTION_RETRY, -BDB::REP_CONNECTION_RETRY

-
rep_timeout[](which)
-
-

Only for DB >= 4.5

-

Returns the database environment timeout for which

-
elect(sites, priority, timeout)
-
rep_elect(sites, priority, timeout)
-
-

Only for DB >= 4

-

Holds an election for the master of a replication group, returning the -new master's ID

-

Raise BDB::RepUnavail if the timeout expires

-
process_message(control, rec, envid)
-
rep_process_message(control, rec, envid)
-
-

Only for DB >= 4

-

Processes an incoming replication message sent by a member of the -replication group to the local database environment

-
start(cdata, flags)
-
rep_start(cdata, flags)
-
-

Only for DB >= 4

-

cdata is an identifier -flags must be one of BDB::REP_CLIENT, BDB::REP_MASTER -or BDB::REP_LOGSONLY

-
lsn_reset(file, flags = 0)
-
-

Only for DB >= 4.4

-

Reset database file LSN

-

The Env#lsn_reset method allows database files to be moved from one transactional -database environment to another.

-

fileThe name of the physical file in which the LSNs are to be cleared. -flags must be set to 0 or BDB::ENCRYPT

-
fileid_reset(file, flags = 0)
-
-

Only for DB >= 4.4

-

Reset database file ID

-

The Env#fileid_reset method allows database files to be copied, and then the copy -used in the same database environment as the original.

-

fileThe name of the physical file in which new file IDs are to be created. -flags must be set to 0 or BDB::ENCRYPT

-
msgcall=(call_proc)
-
-

Only for DB >= 4.4

-

There are interfaces in the Berkeley DB library which either directly output informational -messages or statistical information : Env#msgcall is used to set callback which will -called by BDB

-

The value given must be nil to unconfigure the callback, or and object -which respond to #call : it will called with a String as argument

-
thread_id=(call_proc)
-
-

Only for DB >= 4.4

-

Declare a proc object which returns a unique identifier pair for the current -thread of control.

-

The proc must return a pair

-
    -
  • pid: process ID of the current thread
  • -
  • tid: thread ID of the current thread
  • -
-
thread_id_string=(call_proc)
-
-

Only for DB >= 4.4

-

Declare a proc that formats a process ID and thread ID identifier pair for display.

-

The proc will be called with 2 arguments and must return a String

-
is_alive=(call_proc)
-
-

Only for DB >= 4.4

-

Declare a proc that returns if a thread of control (either a true thread or -a process) is still running.

-

The proc will be called with 2 arguments (pid, tid)

-
failcheck(flag = 0)
-
-

Only for DB >= 4.4

-

The method checks for threads of control (either a true -thread or a process) that have exited while manipulating Berkeley DB library -data structures

-

flag is actually unused and must be set to 0

-
- - - diff -Nru ruby-bdb-0.6.5/docs/hashlike.html ruby-bdb-0.6.6/docs/hashlike.html --- ruby-bdb-0.6.5/docs/hashlike.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/hashlike.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,408 +0,0 @@ - - - - -docs/hashlike.rd - - -

Acces Methods

-

These are the common methods for BDB::Btree, BDB::Hash, -BDB::Recno and BDB::Queue

- -

Class Methods

-
-
open(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
create(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
new(name = nil, subname = nil, flags = 0, mode = 0, options = {})
-
-open the database -
-
name
-
-The argument name is used as the name of a single physical -file on disk that will be used to back the database. -
-
subname
-
-The subname argument allows applications to have -subdatabases, i.e., multiple databases inside of a single physical -file. This is useful when the logical databases are both -numerous and reasonably small, in order to avoid creating a large -number of underlying files. It is an error to attempt to open a -subdatabase in a database file that was not initially -created using a subdatabase name. -
-
flags
-
-

The flags must be the string "r", "r+", "w", "w+", "a", "a+" or -and integer value.

-

The flags value must be set to 0 or by bitwise inclusively -OR'ing together one or more of the following values

-
-
BDB::CREATE
-
-Create any underlying files, as necessary. If the files -do not already exist and the DB_CREATE flag is not -specified, the call will fail. -
-
BD::EXCL
-
-Return an error if the database already exists. Underlying -filesystem primitives are used to implement this -flag. For this reason it is only applicable to the -physical database file and cannot be used to test if a -subdatabase already exists. -
-
BDB::NOMMAP
-
-Do not map this database into process memory. -
-
BDB::RDONLY
-
-Open the database for reading only. Any attempt to -modify items in the database will fail regardless of the -actual permissions of any underlying files. -
-
BDB::TRUNCATE
-
-

Physically truncate the underlying database file, -discarding all previous subdatabases or databases. -Underlying filesystem primitives are used to implement -this flag. For this reason it is only applicable to the -physical database file and cannot be used to discard -subdatabases.

-

The DB_TRUNCATE flag cannot be transaction protected, -and it is an error to specify it in a transaction -protected environment.

-
-
-
-
options
-
-

Hash, Possible options are (see the documentation of Berkeley DB -for more informations)

-
-
store_nil_as_null: if `true' will store `nil' as `\000', otherwise as an empty string (default `false')
-
set_array_base: base index for BDB::Recno, BDB::Queue or BDB::Btree (with BDB::RECNUM). Must be 0 or 1
-
set_bt_compare : specify a Btree comparison function
-
set_bt_minkey : set the minimum number of keys per Btree page
-
set_bt_prefix : specify a Btree prefix comparison function
-
set_cachesize : set the database cache size
-
set_dup_compare : specify a duplicate comparison function
-
set_store_key : specify a Proc called before a key is stored
-
set_fetch_key : specify a Proc called after a key is read
-
set_store_value : specify a Proc called before a value is stored
-
set_fetch_value : specify a Proc called after a value is read
-
set_flags : general database configuration
-
set_h_ffactor : set the Hash table density
-
set_h_hash : specify a hashing function
-
set_h_nelem : set the Hash table size
-
set_lorder : set the database byte order
-
set_pagesize : set the underlying database page size
-
set_re_delim : set the variable-length record delimiter
-
set_re_len : set the fixed-length record length
-
set_re_pad : set the fixed-length record pad byte
-
set_re_source : set the backing Recno text file
-
set_append_recno : modify the stored data for BDB::APPEND
-
set_encrypt : set the password used
-
set_feedback : set the function to monitor some operations
-
env : open the database in the environnement given as the value
-
txn : open the database in the transaction given as the value
-
-

set_append_recno will be called with (key, value) and -it must return nil or the modified value

-

set_encrypt take an Array as arguments with the values -[password, flags], where flags can be 0 or BDB::ENCRYPT_AES

-

Proc given to set_bt_compare, set_bt_prefix, -set_dup_compare, set_h_hash, set_store_key -set_fetch_key, set_store_value, set_fetch_value -set_feedback and set_append_recno -can be also specified as a method (replace the prefix set_ -with bdb_)

-
For example 
-
-  module BDB
-     class Btreesort < Btree
-        def bdb_bt_compare(a, b)
-           b.downcase <=> a.downcase
-        end
-     end
-  end
-
-
-
remove(name, subname = nil)
-
db_remove(name, subname = nil)
-
unlink(name, subname = nil)
-
-

Removes the database (or subdatabase) represented by the -name and subname combination.

-

If no subdatabase is specified, the physical file represented by name -is removed, incidentally removing all subdatabases that it contained.

-
upgrade(name)
-
db_upgrade(name)
-
-Upgrade the database
-
-

Methods

-
-
self[key]
-
-Returns the value corresponding the key
-
associate(db, flag = 0) { |db, key, value| }
-
-

associate a secondary index db

-

flag can have the value BDB::RDONLY

-

The block must return the new key, or Qfalse in this case the -secondary index will not contain any reference to key/value

-
cache_priority
-
-return the current priority value
-
cache_priority=value
-
-set the priority value : can be BDB::PRIORITY_VERY_LOW, -BDB::PRIORITY_LOW, BDB::PRIORITY_DEFAULT, -BDB::PRIORITY_HIGH or BDB::PRIORITY_VERY_HIGH
-
feedback=(proc)
-
-monitor the progress of some operations
-
get(key, flags = 0)
-
db_get(key, flags = 0)
-
fetch(key, flags = 0)
-
-

Returns the value correspondind the key

-

flags can have the values BDB::GET_BOTH, -BDB::SET_RECNO or BDB::RMW

-

In presence of duplicates it will return the first data item, use -#duplicates if you want all duplicates (see also #each_dup)

-
pget(key, flags = 0)
-
-

Returns the primary key and the value corresponding to key -in the secondary index

-

only with >= 3.3.11

-
self[key] = value
-
-

Stores the value associating with key

-

If nil is given as the value, the association from the key will be -removed.

-
put(key, value, flags = 0)
-
db_put(key, value, flags = 0)
-
store(key, value, flags = 0)
-
-

Stores the value associating with key

-

If nil is given as the value, the association from the key -will be removed. It return the object deleted or nil if the -specified key don't exist.

-

flags can have the value DBD::NOOVERWRITE, in this case -it will return nil if the specified key exist, otherwise true

-
append(key, value)
-
db_append(key, value)
-
-Append the value associating with key
-
byteswapped?
-
get_byteswapped
-
-Return if the underlying database is in host order
-
clear_partial
-
partial_clear
-
-Clear partial set.
-
close(flags = 0)
-
db_close(flags = 0)
-
-Closes the file.
-
count(key)
-
dup_count(key)
-
-Return the count of duplicate for key
-
cursor(flags = 0)
-
db_cursor(flags = 0)
-
-Open a new cursor.
-
database()
-
subname()
-
-Return the subname
-
delete(key)
-
db_del(key)
-
-

Removes the association from the key.

-

It return the object deleted or nil if the specified -key don't exist.

-
delete_if(set = nil) { |key, value| ... }
-
reject!(set = nil) { |key, value| ... }
-
-

Deletes associations if the evaluation of the block returns true.

-

set

-
duplicates(key , assoc = true)
-
-

Return an array of all duplicate associations for key

-

if assoc is false return only the values.

-
each(set = nil, bulk = 0, "flags" => 0) { |key, value| ... }
-
each_pair(set = nil, bulk = 0) { |key, value| ... }
-
-

Iterates over associations.

-

set bulk

-
each_by_prefix(prefix) {|key, value| ... }
-
-Iterate over associations, where the key begin with prefix
-
each_dup(key, bulk = 0) { |key, value| ... }
-
-

Iterates over each duplicate associations for key

-

bulk

-
each_dup_value(key, bulk = 0) { |value| ... }
-
-

Iterates over each duplicate values for key

-

bulk

-
each_key(set = nil, bulk = 0) { |key| ... }
-
-

Iterates over keys.

-

set bulk

-
each_primary(set = nil) { |skey, pkey, pvalue| ... }
-
-Iterates over secondary indexes and give secondary key, primary key -and value
-
each_value(set = nil, bulk = 0) { |value| ... }
-
-

Iterates over values.

-

set bulk

-
empty?()
-
-Returns true if the database is empty.
-
filename()
-
-Return the name of the file
-
has_key?(key)
-
key?(key)
-
include?(key)
-
member?(key)
-
-Returns true if the association from the key exists.
-
has_both?(key, value)
-
both?(key, value)
-
-Returns true if the association from key is value
-
has_value?(value)
-
value?(value)
-
-Returns true if the association to the value exists.
-
index(value)
-
-Returns the first key associated with value
-
indexes(value1, value2, )
-
-Returns the keys associated with value1, value2, ...
-
join(cursor , flag = 0) { |key, value| ... }
-
-Perform a join. cursor is an array of BDB::Cursor
-
keys
-
-Returns the array of the keys in the database
-
length
-
size
-
-Returns the number of association in the database.
-
log_register(name)
-
-The log_register function registers a file name.
-
log_unregister()
-
-The log_unregister function unregisters a file name.
-
reject { |key, value| ... }
-
-Create an hash without the associations if the evaluation of the -block returns true.
-
reverse_each(set = nil) { |key, value| ... }
-
reverse_each_pair(set = nil) { |key, value| ... }
-
-

Iterates over associations in reverse order

-

set

-
reverse_each_by_prefix(prefix) {|key, value| ... }
-
-Iterate over associations in reverse order, where the key begin -with prefix
-
reverse_each_key(set = nil) { |key| ... }
-
-

Iterates over keys in reverse order

-

set

-
reverse_each_primary(set = nil) { |skey, pkey, pvalue| ... }
-
-Iterates over secondary indexes in reverse order and give secondary -key, primary key and value
-
reverse_each_value(set = nil) { |value| ... }
-
-

Iterates over values in reverse order.

-

set

-
set_partial(len, offset)
-
-Set the partial value len and offset
-
stat
-
-Return database statistics.
-
to_a
-
-Return an array of all associations [key, value]
-
to_hash
-
-Return an hash of all associations {key => value}
-
truncate
-
clear
-
-Empty a database
-
values
-
-Returns the array of the values in the database.
-
verify(file = nil, flags = 0)
-
-Verify the integrity of the DB file, and optionnally output the -key/data to file (file must respond to #to_io)
-
compact(start = nil, stop = nil, options = nil)
-
-Only for Btree and Recno (DB VERSION >= 4.4) -
    -
  • start starting point for compaction in a Btree or Recno database. - Compaction will start at the smallest key greater than or equal to the - specified key.
  • -
  • stop the stopping point for compaction in a Btree or Recno database. - Compaction will stop at the page with the smallest key greater - than the specified key
  • -
  • options hash with the possible keys -
      -
    • flags with the value 0, BDB::FREELIST_ONLY, or - BDB::FREE_SPACE
    • -
    • compact_fillpercentthe goal for filling pages, specified as a - percentage between 1 and 100.
    • -
    • compact_timeout the lock timeout set for implicit transactions, - in microseconds.
    • -
  • -
-
-

Methods specific to BDB::Recno and BDB::Queue

-
-
pop
-
-Returns the last couple [key, val] (only for BDB::Recno)
-
push values
-
-Push the values
-
shift
-
-Removes and returns an association from the database.
-
-

Remark

-

set

-

If the parameter set is given, an initial call will be made -with the option BDB::SET_RANGE to move the cursor to the specified -key before iterating.

-

bulk

-

Only with >= 3.3.11 : if the parameter bulk is given, -an application buffer of size bulk * 1024 will be used -(see "Retrieving records in bulk" in the documentation of BerkeleyDB)

- - - diff -Nru ruby-bdb-0.6.5/docs/lock.html ruby-bdb-0.6.6/docs/lock.html --- ruby-bdb-0.6.5/docs/lock.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/lock.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ - - - - -docs/lock.rd - - -

Lock system

-

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.

-

The lock subsystem is created, initialized, and opened by calls to -BDB::Env#open with the DBD::INIT_LOCK or -DBB::INIT_CDB flags specified.

-

The following options can be given when the environnement is created

-
-
"set_lk_conflicts"
-
-Set lock conflicts matrix -
-
"set_lk_detect"
-
-Set automatic deadlock detection -
-
"set_lk_max"
-
-Set maximum number of locks -
-
-

BDB::LockError

-

Exception generated by lock call

-

BDB::LockHeld

-

Lock not held by locker

-

BDB::LockGranted

-

Lock not granted

-

BDB::LockDead

-

Locker killed to resolve a deadlock

-

BDB::Lockid

-

A lock ID can be obtained with BDB::Env#lock_id

-

See also BDB::Env#lock_stat and -BDB::Env#lock_detect

-

Methods

-
-
get(string, mode , flags = 0)
-
lock_get(string, mode [, flags])
-
-

The lock_get function acquires a lock from the lock table, it return -an object BDB::Lock

-

string specifies the object to be locked or released.

-

mode is an index into the environment's lock conflict array

-

flags value must be set to 0 or the value BDBD::LOCK_NOWAIT -in this case if a lock cannot be granted because the requested -lock conflicts with an existing lock, raise an error BDB::LockGranted

-
vec(array , flags = 0)
-
lock_vec(array [, flags])
-
-The lock_vec function atomically obtains and releases one or more -locks from the lock table. The lock_vec function is intended to -support acquisition or trading of multiple locks under one lock table -semaphore, as is needed for lock coupling or in multigranularity -locking for lock escalation. -
-
array
-
-ARRAY of HASH with the following keys -
-
"op"
-
-the operation to be performed, which must be set to one -of the following values BDB::LOCK_GET, BDB::LOCK_PUT, -BDB::LOCK_PUT_ALL or BDB::LOCK_PUT_OBJ -
-
"obj"
-
-the object (String) to be locked or released -
-
"mode"
-
-is an index into the environment's lock conflict array -
-
"lock"
-
-an object BDB::Lock -
-
-
-
flags
-
-value must be set to 0 or the value BDBD::LOCK_NOWAIT -in this case if a lock cannot be granted because the requested -lock conflicts with an existing lock, raise an error -BDB::LockGrantedreturn immediately -
-
-
-

BDB::Lock

-

Methods

-
-
put()
-
lock_put()
-
release()
-
delete()
-
-The lock_put function releases lock from the lock table.
-
- - - diff -Nru ruby-bdb-0.6.5/docs/log.html ruby-bdb-0.6.6/docs/log.html --- ruby-bdb-0.6.5/docs/log.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/log.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ - - - - -docs/log.rd - - -

Logging subsystem

-

This subsystem is used when recovery from application or system -failure is necessary.

-

The log is stored in one or more files in the environment -directory. Each file is named using the format log.NNNNNNNNNN, where -NNNNNNNNNN is the sequence number of the file within the log.

-

If the log region is being created and log files are already present, -the log files are reviewed and subsequent log writes are appended to -the end of the log, rather than overwriting current log entries.

-

The lock subsystem is created, initialized, and opened by calls to -BDB::Env#open with the BDB::INIT_LOG flag specified.

-

The following options can be given when the environnement is created

-
-
"set_lg_bsize"
-
-Set log buffer size -
-
"set_lg_dir"
-
-Set the environment logging directory -
-
"set_lg_max"
-
-Set log file size -
-
-

BDB::Env

-

Methods

-
-
log_archive(flags = 0)
-
-

The log_archive function return an array of log or database file names.

-

flags value must be set to 0 or the value BDB::ARCH_DATA

-
((|BDB::ARCH_DATA|)), ((|BDB::ARCH_LOG|))
-
log_checkpoint(string)
-
-same as log_put(string, BDB::CHECKPOINT)
-
log_curlsn(string)
-
-same as log_put(string, BDB::CURLSN)
-
log_each { |string, lsn| ... }
-
-Implement an iterator inside of the log
-
log_flush([string])
-
-

same as log_put(string, BDB::FLUSH)

-

Without argument, garantee that all records are written to the disk

-
log_get(flag)
-
-

The log_get return an array [String, BDB::Lsn] according to -the flag value.

-

flag can has the value BDB::CHECKPOINT, BDB::FIRST, -BDB::LAST, BDB::NEXT, BDB::PREV, BDB::CURRENT

-
log_put(string, flag = 0)
-
-

The log_put function appends records to the log. It return -an object BDB::Lsn

-

flag can have the value BDB::CHECKPOINT, BDB::CURLSN, -BDB::FLUSH

-
log_reverse_each { |string, lsn| ... }
-
-Implement an iterator inside of the log
-
log_stat
-
-return log statistics
-
-

BDB::Common

-

Methods

-
-
log_register(name)
-
-The log_register function registers a file name.
-
log_unregister()
-
-The log_unregister function unregisters a file name.
-
-

BDB::Lsn

-

include Comparable

-
-
<=>
-
-compare 2 BDB::Lsn
-
log_file(name)
-
file(name)
-
-The log_file function maps BDB::Lsn structures to file -names
-
log_flush
-
flush
-
-The log_flush function guarantees that all log records whose -DBB:Lsn are less than or equal to the current lsn have been written -to disk.
-
log_get
-
get
-
-return the String associated with this BDB::Lsn
-
- - - diff -Nru ruby-bdb-0.6.5/docs/sequence.html ruby-bdb-0.6.6/docs/sequence.html --- ruby-bdb-0.6.5/docs/sequence.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/sequence.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ - - - - -docs/sequence.rd - - -

BDB::Sequence

-

A sequence is created with BDB::Common::create_sequence or -BDB::Common::open_sequence (only with db >= 4.3)

-

class BDB::Common

-
-
create_sequence(key, init = nil, options = {}) {|sequence| }
-
-

create a new sequence (see also open_sequence)

-

equivalent to -open_sequence(key, BDB::CREATE|BDB::EXCL, init, options)

-

return (or yield) an object BDB::Sequence

-
open_sequence(key, flags = 0, init = nil, options = {}) {|sequence| }
-
-

create or open a sequence (see BDB::Sequence)

-

key : key for the sequence

-

flags : flags can have BDB::CREATE, BDB::EXCL, BDB::AUTO_COMMIT, -BDB::THREAD

-

init : initial value for the sequence

-

options : hash with the possible keys "set_cachesize", -"set_flags" and "set_range"

-

return (or yield) an object BDB::Sequence

-
-

Methods

-
-
cachesize
-
-return the current cache size
-
close
-
-close the sequence
-
db
-
-return the bdb file associated with the sequence
-
flags
-
-return the current flags
-
get(delta = 1, flags = 0)
-
-

return the next available element in the sequence and changes -the sequence value by delta

-

flags can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC

-
key
-
-return the key associated with the sequence
-
range
-
-return the range of values in the sequence
-
remove(flags = 0)
-
-

remove the sequence

-

flags can have the value BDB::AUTO_COMMIT, BDB::TXN_NOSYNC

-
stat(flags = 0)
-
-

return statistics about the sequence

-

flags can have the value BDB::STAT_CLEAR

-
- - - diff -Nru ruby-bdb-0.6.5/docs/transaction.html ruby-bdb-0.6.6/docs/transaction.html --- ruby-bdb-0.6.5/docs/transaction.html 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/docs/transaction.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ - - - - -docs/transaction.rd - - -

BDB::Txn

-

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.

-

The transaction subsystem is created, initialized, and opened by calls -to BDB::Env#open with the BDB::INIT_TXN -flag (or BDB::INIT_TRANSACTION) specified. -Note that enabling transactions automatically enables -logging, but does not enable locking, as a single thread of control -that needed atomicity and recoverability would not require it.

-

The following option can be given when the environnement is created

-
-
"set_tx_max"
-
-Set maximum number of transactions -
-
-

and with DB >= 4.0

-
-
"set_timeout"
-
"set_txn_timeout"
-
"set_lock_timeout"
-
-

The transaction is created with BDB::Env#begin -or with begin

-

See also BDB::Env#txn_stat and -BDB::Env#txn_checkpoint

-

Methods

-
-
abort()
-
txn_abort()
-
-Abort the transaction. This is will terminate the transaction.
-
assoc(db, ...)
-
associate(db, ...)
-
txn_assoc(db, ...)
-
-Associate a database with the transaction, return a new database -handle which is transaction protected.
-
begin(flags = 0, db, ...) { |txn, db, ...| ...}
-
begin(flags = 0, db, ...)
-
txn_begin(flags = 0, db, ...)
-
-

begin a transaction (the transaction manager must be enabled). flags -can have the value DBD::TXN_COMMIT, in this case the transaction -will be commited at end.

-

Return a new transaction object, and the associated database handle -if specified.

-

If #begin is called as an iterator, #commit and #abort -will terminate the iterator.

-
env.begin(db) do |txn, b|
-...
-end
-
-is the same than
-
-env.begin do |txn|
-    b = txn.assoc(db)
-    ...
-end
-

An optional hash can be given with the possible keys "flags", -"set_timeout", "set_txn_timeout", "set_lock_timeout"

-
commit(flags = 0)
-
close(flags = 0)
-
txn_commit(flags = 0)
-
txn_close(flags = 0)
-
-

Commit the transaction. This will finish the transaction. -The flags can have the value

-

BDB::TXN_SYNC Synchronously flush the log. This means the -transaction will exhibit all of the ACID (atomicity, consistency -and isolation and durability) properties. This is the default value.

-

BDB::TXN_NOSYNC Do not synchronously flush the log. This -means the transaction will exhibit the ACI (atomicity, consistency -and isolation) properties, but not D (durability), i.e., database -integrity will be maintained but it is possible that this -transaction may be undone during recovery instead of being redone.

-

This behavior may be set for an entire Berkeley DB environment as -part of the open interface.

-
discard
-
txn_discard
-
-

only with BDB::VERSION_MAJOR == 3 && BDB::VERSION_MINOR >= 3

-

Discard a prepared but not resolved transaction handle, must be called -only within BDB::Env#recover

-
dbremove(file, database = nil, flags = 0)
-
-

only with BDB::VERSION_MAJOR == 4 && BDB::VERSION_MINOR >= 1

-

remove the database specified by file and database. If no -database is nil, the underlying file represented by -file is removed, incidentally removing all databases -that it contained.

-

The flags value must be set to 0 or BDB::AUTO_COMMIT

-
dbrename(file, database, newname, flags = 0)
-
-

only with BDB::VERSION_MAJOR == 4 && BDB::VERSION_MINOR >= 1

-

rename the database specified by file and database to -newname. If database is nil, the underlying file -represented by file is renamed, incidentally renaming all databases -that it contained.

-

The flags value must be set to 0 or BDB::AUTO_COMMIT

-
id()
-
txn_id()
-
-The txn_id function returns the unique transaction id associated -with the specified transaction. Locking calls made on behalf of -this transaction should use the value returned from txn_id as the -locker parameter to the lock_get or lock_vec calls.
-
open_db(type, name = nil, subname = nil, flags = 0, mode = 0)
-
-

Only with DB >= 4.1

-

open the database in the current transaction. type must be one of -the constant BDB::BTREE, BDB::HASH, BDB::RECNO, -BDB::QUEUE. See open for other -arguments

-
prepare()
-
txn_prepare()
-
prepare(id) # version 3.3.11
-
txn_prepare(id) # version 3.3.11
-
-

The txn_prepare function initiates the beginning of a two-phase commit.

-

In a distributed transaction environment, Berkeley DB can be used -as a local transaction manager. In this case, the distributed -transaction manager must send prepare messages to each local -manager. The local manager must then issue a txn_prepare and await its -successful return before responding to the distributed transaction -manager. Only after the distributed transaction manager receives -successful responses from all of its prepare messages should it issue -any commit messages.

-
name # version 4.4
-
-Return the string associated with a transaction
-
name=(string) # version 4.4
-
-Set the string associated with a transaction
-
- - - diff -Nru ruby-bdb-0.6.5/.gitignore ruby-bdb-0.6.6/.gitignore --- ruby-bdb-0.6.5/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ ruby-bdb-0.6.6/.gitignore 2011-04-06 19:35:39.000000000 +0000 @@ -0,0 +1,11 @@ +*.html +Makefile +bdbxml2/bdbxml_features.h +bdbxml[12]/*.html +bdbxml[12]/*.so +bdbxml[12]/docs/*.html +docs/*.html +src/Makefile +src/bdb.so +src/bdb_features.h +src/mkmf.log diff -Nru ruby-bdb-0.6.5/src/bdb_features.h ruby-bdb-0.6.6/src/bdb_features.h --- ruby-bdb-0.6.5/src/bdb_features.h 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/src/bdb_features.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,527 +0,0 @@ -#define HAVE_RB_FRAME_THIS_FUNC 1 -#define HAVE_RB_BLOCK_PROC 1 -#define HAVE_RB_BLOCK_CALL 1 -#define HAVE_RB_ARY_INSERT 1 -#define HAVE_RB_ARY_VALUES_AT 1 -#define HAVE_TYPE_RB_IO_T 1 -#define HAVE_CONST_DB_AFTER 1 -#define HAVE_CONST_DB_AGGRESSIVE 1 -#define HAVE_CONST_DB_APPEND 1 -#define HAVE_CONST_DB_ARCH_ABS 1 -#define HAVE_CONST_DB_ARCH_DATA 1 -#define HAVE_CONST_DB_ARCH_LOG 1 -#define HAVE_CONST_DB_AUTO_COMMIT 1 -#define HAVE_CONST_DB_BEFORE 1 -#define HAVE_CONST_DB_BTREE 1 -#define HAVE_CONST_DB_CDB_ALLDB 1 -#define HAVE_CONST_DB_CHKSUM 1 -#define HAVE_CONST_DB_CONSUME 1 -#define HAVE_CONST_DB_CONSUME_WAIT 1 -#define HAVE_CONST_DB_CREATE 1 -#define HAVE_CONST_DB_CURRENT 1 -#define HAVE_CONST_DB_DBT_MALLOC 1 -#define HAVE_CONST_DB_DBT_PARTIAL 1 -#define HAVE_CONST_DB_DBT_REALLOC 1 -#define HAVE_CONST_DB_DBT_USERMEM 1 -#define HAVE_CONST_DB_DIRECT_DB 1 -#define HAVE_CONST_DB_DIRECT_LOG 1 -#define HAVE_CONST_DB_DIRTY_READ 1 -#define HAVE_CONST_DB_DONOTINDEX 1 -#define HAVE_CONST_DB_DSYNC_LOG 1 -#define HAVE_CONST_DB_DUP 1 -#define HAVE_CONST_DB_DUPSORT 1 -#define HAVE_CONST_DB_EID_BROADCAST 1 -#define HAVE_CONST_DB_EID_INVALID 1 -#define HAVE_CONST_DB_ENCRYPT 1 -#define HAVE_CONST_DB_ENCRYPT_AES 1 -#define HAVE_CONST_DB_ENV_THREAD 1 -#define HAVE_CONST_DB_EVENT_PANIC 1 -#define HAVE_CONST_DB_EVENT_REP_CLIENT 1 -#define HAVE_CONST_DB_EVENT_REP_ELECTED 1 -#define HAVE_CONST_DB_EVENT_REP_MASTER 1 -#define HAVE_CONST_DB_EVENT_REP_NEWMASTER 1 -#define HAVE_CONST_DB_EVENT_REP_PERM_FAILED 1 -#define HAVE_CONST_DB_EVENT_REP_STARTUPDONE 1 -#define HAVE_CONST_DB_EVENT_WRITE_FAILED 1 -#define HAVE_CONST_DB_EXCL 1 -#define HAVE_CONST_DB_FAST_STAT 1 -#define HAVE_CONST_DB_FIRST 1 -#define HAVE_CONST_DB_FLUSH 1 -#define HAVE_CONST_DB_FORCE 1 -#define HAVE_CONST_DB_GET_BOTH_RANGE 1 -#define HAVE_CONST_DB_GET_RECNO 1 -#define HAVE_CONST_DB_GET_BOTH 1 -#define HAVE_CONST_DB_HASH 1 -#define HAVE_CONST_DB_IGNORE_LEASE 1 -#define HAVE_CONST_DB_INIT_CDB 1 -#define HAVE_CONST_DB_INIT_LOCK 1 -#define HAVE_CONST_DB_INIT_LOG 1 -#define HAVE_CONST_DB_INIT_MPOOL 1 -#define HAVE_CONST_DB_INIT_REP 1 -#define HAVE_CONST_DB_INIT_TXN 1 -#define HAVE_CONST_DB_JOINENV 1 -#define HAVE_CONST_DB_JOIN_ITEM 1 -#define HAVE_CONST_DB_JOIN_NOSORT 1 -#define HAVE_CONST_DB_KEYEMPTY 1 -#define HAVE_CONST_DB_KEYEXIST 1 -#define HAVE_CONST_DB_KEYFIRST 1 -#define HAVE_CONST_DB_KEYLAST 1 -#define HAVE_CONST_DB_LAST 1 -#define HAVE_CONST_DB_LOCKDOWN 1 -#define HAVE_CONST_DB_LOCK_DEADLOCK 1 -#define HAVE_CONST_DB_LOCK_DEFAULT 1 -#define HAVE_CONST_DB_LOCK_EXPIRE 1 -#define HAVE_CONST_DB_LOCK_GET 1 -#define HAVE_CONST_DB_LOCK_GET_TIMEOUT 1 -#define HAVE_CONST_DB_LOCK_IREAD 1 -#define HAVE_CONST_DB_LOCK_IWR 1 -#define HAVE_CONST_DB_LOCK_IWRITE 1 -#define HAVE_CONST_DB_LOCK_MAXLOCKS 1 -#define HAVE_CONST_DB_LOCK_MINLOCKS 1 -#define HAVE_CONST_DB_LOCK_MINWRITE 1 -#define HAVE_CONST_DB_LOCK_NG 1 -#define HAVE_CONST_DB_LOCK_NOTGRANTED 1 -#define HAVE_CONST_DB_LOCK_NOWAIT 1 -#define HAVE_CONST_DB_LOCK_OLDEST 1 -#define HAVE_CONST_DB_LOCK_PUT 1 -#define HAVE_CONST_DB_LOCK_PUT_ALL 1 -#define HAVE_CONST_DB_LOCK_PUT_OBJ 1 -#define HAVE_CONST_DB_LOCK_RANDOM 1 -#define HAVE_CONST_DB_LOCK_READ 1 -#define HAVE_CONST_DB_LOCK_TIMEOUT 1 -#define HAVE_CONST_DB_LOCK_WRITE 1 -#define HAVE_CONST_DB_LOCK_YOUNGEST 1 -#define HAVE_CONST_DB_LOG_AUTOREMOVE 1 -#define HAVE_CONST_DB_LOG_INMEMORY 1 -#define HAVE_CONST_DB_MPOOL_CREATE 1 -#define HAVE_CONST_DB_MPOOL_DIRTY 1 -#define HAVE_CONST_DB_MPOOL_DISCARD 1 -#define HAVE_CONST_DB_MPOOL_LAST 1 -#define HAVE_CONST_DB_MPOOL_NEW 1 -#define HAVE_CONST_DB_MULTIVERSION 1 -#define HAVE_CONST_DB_MUTEX_PROCESS_ONLY 1 -#define HAVE_CONST_DB_NEXT_DUP 1 -#define HAVE_CONST_DB_NEXT_NODUP 1 -#define HAVE_CONST_DB_NODUPDATA 1 -#define HAVE_CONST_DB_NOORDERCHK 1 -#define HAVE_CONST_DB_NOSERVER 1 -#define HAVE_CONST_DB_NOSERVER_HOME 1 -#define HAVE_CONST_DB_NOSERVER_ID 1 -#define HAVE_CONST_DB_NOTFOUND 1 -#define HAVE_CONST_DB_OLD_VERSION 1 -#define HAVE_CONST_DB_ORDERCHKONLY 1 -#define HAVE_CONST_DB_OVERWRITE 1 -#define HAVE_CONST_DB_POSITION 1 -#define HAVE_CONST_DB_PRIVATE 1 -#define HAVE_CONST_DB_SYSTEM_MEM 1 -#define HAVE_CONST_DB_RMW 1 -#define HAVE_CONST_DB_PREV_DUP 1 -#define HAVE_CONST_DB_PREV_NODUP 1 -#define HAVE_CONST_DB_PRINTABLE 1 -#define HAVE_CONST_DB_PRIORITY_DEFAULT 1 -#define HAVE_CONST_DB_PRIORITY_HIGH 1 -#define HAVE_CONST_DB_PRIORITY_LOW 1 -#define HAVE_CONST_DB_PRIORITY_VERY_HIGH 1 -#define HAVE_CONST_DB_QUEUE 1 -#define HAVE_CONST_DB_RDONLY 1 -#define HAVE_CONST_DB_READ_COMMITTED 1 -#define HAVE_CONST_DB_READ_UNCOMMITTED 1 -#define HAVE_CONST_DB_RECNO 1 -#define HAVE_CONST_DB_RECNUM 1 -#define HAVE_CONST_DB_RECOVER 1 -#define HAVE_CONST_DB_RECOVER_FATAL 1 -#define HAVE_CONST_DB_REGION_INIT 1 -#define HAVE_CONST_DB_RENUMBER 1 -#define HAVE_CONST_DB_REPFLAGS_MASK 1 -#define HAVE_CONST_DB_REPMGR_ACKS_ALL 1 -#define HAVE_CONST_DB_REPMGR_ACKS_ALL_PEERS 1 -#define HAVE_CONST_DB_REPMGR_ACKS_NONE 1 -#define HAVE_CONST_DB_REPMGR_ACKS_ONE 1 -#define HAVE_CONST_DB_REPMGR_ACKS_ONE_PEER 1 -#define HAVE_CONST_DB_REPMGR_ACKS_QUORUM 1 -#define HAVE_CONST_DB_REPMGR_CONNECTED 1 -#define HAVE_CONST_DB_REPMGR_DISCONNECTED 1 -#define HAVE_CONST_DB_REPMGR_PEER 1 -#define HAVE_CONST_DB_REP_ACK_TIMEOUT 1 -#define HAVE_CONST_DB_REP_ANYWHERE 1 -#define HAVE_CONST_DB_REP_BULKOVF 1 -#define HAVE_CONST_DB_REP_CHECKPOINT_DELAY 1 -#define HAVE_CONST_DB_REP_CLIENT 1 -#define HAVE_CONST_DB_REP_CONF_BULK 1 -#define HAVE_CONST_DB_REP_CONF_DELAYCLIENT 1 -#define HAVE_CONST_DB_REP_CONF_NOAUTOINIT 1 -#define HAVE_CONST_DB_REP_CONF_NOWAIT 1 -#define HAVE_CONST_DB_REP_CONNECTION_RETRY 1 -#define HAVE_CONST_DB_REP_DEFAULT_PRIORITY 1 -#define HAVE_CONST_DB_REP_DUPMASTER 1 -#define HAVE_CONST_DB_REP_EGENCHG 1 -#define HAVE_CONST_DB_REP_ELECTION 1 -#define HAVE_CONST_DB_REP_ELECTION_RETRY 1 -#define HAVE_CONST_DB_REP_ELECTION_TIMEOUT 1 -#define HAVE_CONST_DB_REP_FULL_ELECTION_TIMEOUT 1 -#define HAVE_CONST_DB_REP_HANDLE_DEAD 1 -#define HAVE_CONST_DB_REP_HOLDELECTION 1 -#define HAVE_CONST_DB_REP_IGNORE 1 -#define HAVE_CONST_DB_REP_ISPERM 1 -#define HAVE_CONST_DB_REP_JOIN_FAILURE 1 -#define HAVE_CONST_DB_REP_LEASE_EXPIRED 1 -#define HAVE_CONST_DB_REP_LEASE_TIMEOUT 1 -#define HAVE_CONST_DB_REP_LOCKOUT 1 -#define HAVE_CONST_DB_REP_LOGREADY 1 -#define HAVE_CONST_DB_REP_MASTER 1 -#define HAVE_CONST_DB_REP_NEWMASTER 1 -#define HAVE_CONST_DB_REP_NEWSITE 1 -#define HAVE_CONST_DB_REP_NOBUFFER 1 -#define HAVE_CONST_DB_REP_NOTPERM 1 -#define HAVE_CONST_DB_REP_PAGEDONE 1 -#define HAVE_CONST_DB_REP_PERMANENT 1 -#define HAVE_CONST_DB_REP_REREQUEST 1 -#define HAVE_CONST_DB_REP_UNAVAIL 1 -#define HAVE_CONST_DB_RPCCLIENT 1 -#define HAVE_CONST_DB_RUNRECOVERY 1 -#define HAVE_CONST_DB_SALVAGE 1 -#define HAVE_CONST_DB_SECONDARY_BAD 1 -#define HAVE_CONST_DB_SET 1 -#define HAVE_CONST_DB_SET_LOCK_TIMEOUT 1 -#define HAVE_CONST_DB_SET_RANGE 1 -#define HAVE_CONST_DB_SET_RECNO 1 -#define HAVE_CONST_DB_SET_TXN_TIMEOUT 1 -#define HAVE_CONST_DB_SNAPSHOT 1 -#define HAVE_CONST_DB_STAT_ALL 1 -#define HAVE_CONST_DB_STAT_CLEAR 1 -#define HAVE_CONST_DB_STAT_SUBSYSTEM 1 -#define HAVE_CONST_DB_THREAD 1 -#define HAVE_CONST_DB_TRUNCATE 1 -#define HAVE_CONST_DB_TXN_ABORT 1 -#define HAVE_CONST_DB_TXN_APPLY 1 -#define HAVE_CONST_DB_TXN_BACKWARD_ROLL 1 -#define HAVE_CONST_DB_TXN_FORWARD_ROLL 1 -#define HAVE_CONST_DB_TXN_NOSYNC 1 -#define HAVE_CONST_DB_TXN_NOWAIT 1 -#define HAVE_CONST_DB_TXN_PRINT 1 -#define HAVE_CONST_DB_TXN_SNAPSHOT 1 -#define HAVE_CONST_DB_TXN_SYNC 1 -#define HAVE_CONST_DB_TXN_WRITE_NOSYNC 1 -#define HAVE_CONST_DB_UNKNOWN 1 -#define HAVE_CONST_DB_UPGRADE 1 -#define HAVE_CONST_DB_USE_ENVIRON 1 -#define HAVE_CONST_DB_USE_ENVIRON_ROOT 1 -#define HAVE_CONST_DB_VERB_DEADLOCK 1 -#define HAVE_CONST_DB_VERB_RECOVERY 1 -#define HAVE_CONST_DB_VERB_REPLICATION 1 -#define HAVE_CONST_DB_VERB_WAITSFOR 1 -#define HAVE_CONST_DB_VERIFY 1 -#define HAVE_CONST_DB_PRIORITY_VERY_LOW 1 -#define HAVE_CONST_DB_WRITECURSOR 1 -#define HAVE_CONST_DB_XA_CREATE 1 -#define HAVE_CONST_DB_XIDDATASIZE 1 -#define HAVE_CONST_DB_MULTIPLE_KEY 1 -#define HAVE_CONST_DB_TXN_NOT_DURABLE 1 -#define HAVE_DB_STRERROR 1 -#define HAVE_TYPE_DB_KEY_RANGE 1 -#define HAVE_TYPE_DB_SEQUENCE 1 -#define HAVE_TYPE_DB_LOGC 1 -#define HAVE_TYPE_DBTYPE 1 -#define HAVE_TYPE_DB_COMPACT 1 -#define HAVE_TYPE_DB_HASH_STAT 1 -#define HAVE_ST_DB_HASH_STAT_HASH_NKEYS 1 -#define HAVE_ST_DB_HASH_STAT_HASH_NDATA 1 -#define HAVE_ST_DB_HASH_STAT_HASH_PAGECNT 1 -#define HAVE_TYPE_DB_QUEUE_STAT 1 -#define HAVE_ST_DB_QUEUE_STAT_QS_NKEYS 1 -#define HAVE_ST_DB_QUEUE_STAT_QS_NDATA 1 -#define HAVE_TYPE_DB_REP_STAT 1 -#define HAVE_ST_DB_REP_STAT_ST_BULK_FILLS 1 -#define HAVE_ST_DB_REP_STAT_ST_BULK_OVERFLOWS 1 -#define HAVE_ST_DB_REP_STAT_ST_BULK_RECORDS 1 -#define HAVE_ST_DB_REP_STAT_ST_BULK_TRANSFERS 1 -#define HAVE_ST_DB_REP_STAT_ST_CLIENT_REREQUESTS 1 -#define HAVE_ST_DB_REP_STAT_ST_CLIENT_SVC_MISS 1 -#define HAVE_ST_DB_REP_STAT_ST_CLIENT_SVC_REQ 1 -#define HAVE_ST_DB_REP_STAT_ST_EGEN 1 -#define HAVE_ST_DB_REP_STAT_ST_ELECTION_NVOTES 1 -#define HAVE_ST_DB_REP_STAT_ST_ELECTION_SEC 1 -#define HAVE_ST_DB_REP_STAT_ST_ELECTION_USEC 1 -#define HAVE_ST_DB_REP_STAT_ST_NEXT_PG 1 -#define HAVE_ST_DB_REP_STAT_ST_PG_DUPLICATED 1 -#define HAVE_ST_DB_REP_STAT_ST_PG_RECORDS 1 -#define HAVE_ST_DB_REP_STAT_ST_PG_REQUESTED 1 -#define HAVE_ST_DB_REP_STAT_ST_STARTUP_COMPLETE 1 -#define HAVE_ST_DB_REP_STAT_ST_WAITING_PG 1 -#define HAVE_ST_DBC_C_CLOSE 1 -#define HAVE_ST_DBC_C_COUNT 1 -#define HAVE_ST_DBC_C_DEL 1 -#define HAVE_ST_DBC_C_DUP 1 -#define HAVE_ST_DBC_C_GET 1 -#define HAVE_ST_DBC_C_PGET 1 -#define HAVE_ST_DBC_C_PUT 1 -#define HAVE_ST_DBC_CLOSE 1 -#define HAVE_ST_DBC_COUNT 1 -#define HAVE_ST_DBC_DEL 1 -#define HAVE_ST_DBC_DUP 1 -#define HAVE_ST_DBC_GET 1 -#define HAVE_ST_DBC_PGET 1 -#define HAVE_ST_DBC_PUT 1 -#define HAVE_ST_DBC_GET_PRIORITY 1 -#define HAVE_ST_DB_APP_PRIVATE 1 -#define HAVE_ST_DB_SET_H_COMPARE 1 -#define HAVE_ST_DB_SET_APPEND_RECNO 1 -#define HAVE_ST_DB_SET_FEEDBACK 1 -#define HAVE_ST_DB_SET_ENCRYPT 1 -#define HAVE_ST_DB_SET_ERRCALL 1 -#define HAVE_ST_DB_GET_TYPE 1 -#define HAVE_ST_DB_PGET 1 -#define HAVE_ST_DB_FD 1 -#define HAVE_ST_DB_SET_PRIORITY 1 -#define HAVE_ST_DB_GET_BT_MINKEY 1 -#define HAVE_ST_DB_GET_CACHESIZE 1 -#define HAVE_ST_DB_GET_DBNAME 1 -#define HAVE_ST_DB_GET_ENV 1 -#define HAVE_ST_DB_GET_H_FFACTOR 1 -#define HAVE_ST_DB_GET_H_NELEM 1 -#define HAVE_ST_DB_GET_LORDER 1 -#define HAVE_ST_DB_GET_PAGESIZE 1 -#define HAVE_ST_DB_GET_Q_EXTENTSIZE 1 -#define HAVE_ST_DB_GET_RE_DELIM 1 -#define HAVE_ST_DB_GET_RE_LEN 1 -#define HAVE_ST_DB_GET_RE_PAD 1 -#define HAVE_ST_DB_GET_RE_SOURCE 1 -#define HAVE_ST_DB_GET_FLAGS 1 -#define HAVE_ST_DB_GET_OPEN_FLAGS 1 -#define HAVE_ST_DB_VERIFY 1 -#define HAVE_ST_DB_TRUNCATE 1 -#define HAVE_ST_DB_UPGRADE 1 -#define HAVE_ST_DB_REMOVE 1 -#define HAVE_ST_DB_RENAME 1 -#define HAVE_ST_DB_JOIN 1 -#define HAVE_ST_DB_GET_BYTESWAPPED 1 -#define HAVE_DB_GET_TYPE_2 1 -#define HAVE_ST_DB_OPEN 1 -#define HAVE_DB_OPEN_7 1 -#define HAVE_DB_OPEN_7_DB_CREATE 1 -#define HAVE_DB_KEY_DBT_MALLOC 1 -#define HAVE_ST_DB_ASSOCIATE 1 -#define HAVE_DB_ASSOCIATE_TXN 1 -#define HAVE_DB_JOIN_FLAG_DBC 1 -#define HAVE_DB_GET_BYTESWAPPED_2 1 -#define HAVE_ST_DB_ENV_GET_CACHESIZE 1 -#define HAVE_ST_DB_ENV_GET_DATA_DIRS 1 -#define HAVE_ST_DB_ENV_GET_FLAGS 1 -#define HAVE_ST_DB_ENV_GET_HOME 1 -#define HAVE_ST_DB_ENV_GET_LG_BSIZE 1 -#define HAVE_ST_DB_ENV_GET_LG_DIR 1 -#define HAVE_ST_DB_ENV_GET_LG_MAX 1 -#define HAVE_ST_DB_ENV_GET_LG_REGIONMAX 1 -#define HAVE_ST_DB_ENV_GET_LK_DETECT 1 -#define HAVE_ST_DB_ENV_GET_LK_MAX_LOCKERS 1 -#define HAVE_ST_DB_ENV_GET_LK_MAX_LOCKS 1 -#define HAVE_ST_DB_ENV_GET_LK_MAX_OBJECTS 1 -#define HAVE_ST_DB_ENV_GET_MP_MMAPSIZE 1 -#define HAVE_ST_DB_ENV_GET_OPEN_FLAGS 1 -#define HAVE_ST_DB_ENV_GET_SHM_KEY 1 -#define HAVE_ST_DB_ENV_GET_TMP_DIR 1 -#define HAVE_ST_DB_ENV_GET_TIMEOUT 1 -#define HAVE_ST_DB_ENV_GET_TX_MAX 1 -#define HAVE_ST_DB_ENV_GET_TX_TIMESTAMP 1 -#define HAVE_ST_DB_ENV_REP_GET_NSITES 1 -#define HAVE_ST_DB_ENV_REP_GET_PRIORITY 1 -#define HAVE_ST_DB_ENV_LOG_PUT 1 -#define HAVE_ST_DB_ENV_LOG_FLUSH 1 -#define HAVE_ST_DB_ENV_LOG_CURSOR 1 -#define HAVE_ST_DB_ENV_LOG_FILE 1 -#define HAVE_ST_DB_ENV_LOG_FLUSH 1 -#define HAVE_ST_DB_ENV_SET_FEEDBACK 1 -#define HAVE_ST_DB_ENV_SET_APP_DISPATCH 1 -#define HAVE_ST_DB_ENV_SET_TIMEOUT 1 -#define HAVE_ST_DB_ENV_SET_ENCRYPT 1 -#define HAVE_ST_DB_ENV_REP_ELECT 1 -#define HAVE_ST_DB_ENV_REP_START 1 -#define HAVE_ST_DB_ENV_REP_PROCESS_MESSAGE 1 -#define HAVE_ST_DB_ENV_REP_SET_LIMIT 1 -#define HAVE_ST_DB_ENV_SET_MSGCALL 1 -#define HAVE_ST_DB_ENV_SET_THREAD_ID 1 -#define HAVE_ST_DB_ENV_SET_THREAD_ID_STRING 1 -#define HAVE_ST_DB_ENV_SET_ISALIVE 1 -#define HAVE_ST_DB_ENV_SET_SHM_KEY 1 -#define HAVE_ST_DB_ENV_REP_SET_NSITES 1 -#define HAVE_ST_DB_ENV_REP_SET_PRIORITY 1 -#define HAVE_ST_DB_ENV_REP_SET_CONFIG 1 -#define HAVE_ST_DB_ENV_REP_SET_TIMEOUT 1 -#define HAVE_ST_DB_ENV_REP_SET_TRANSPORT 1 -#define HAVE_ST_DB_ENV_REPMGR_SET_LOCAL_SITE 1 -#define HAVE_ST_DB_ENV_REPMGR_ADD_REMOTE_SITE 1 -#define HAVE_ST_DB_ENV_REPMGR_SET_ACK_POLICY 1 -#define HAVE_ST_DB_ENV_REPMGR_START 1 -#define HAVE_ST_DB_ENV_SET_EVENT_NOTIFY 1 -#define HAVE_ST_DB_ENV_SET_CACHESIZE 1 -#define HAVE_ST_DB_ENV_SET_TX_TIMESTAMP 1 -#define HAVE_ST_DB_ENV_SET_VERBOSE 1 -#define HAVE_ST_DB_ENV_LK_DETECT 1 -#define HAVE_ST_DB_ENV_SET_LK_DETECT 1 -#define HAVE_ST_DB_ENV_LK_MAX 1 -#define HAVE_ST_DB_ENV_LK_CONFLICTS 1 -#define HAVE_ST_DB_ENV_SET_LK_CONFLICTS 1 -#define HAVE_ST_DB_ENV_SET_TIMEOUT 1 -#define HAVE_ST_DB_ENV_SET_LK_MAX_LOCKS 1 -#define HAVE_ST_DB_ENV_SET_LK_MAX_LOCKERS 1 -#define HAVE_ST_DB_ENV_SET_LK_MAX_OBJECTS 1 -#define HAVE_ST_DB_ENV_SET_LG_BSIZE 1 -#define HAVE_ST_DB_ENV_SET_DATA_DIR 1 -#define HAVE_ST_DB_ENV_SET_LG_DIR 1 -#define HAVE_ST_DB_ENV_SET_TMP_DIR 1 -#define HAVE_ST_DB_ENV_SET_RPC_SERVER 1 -#define HAVE_ST_DB_ENV_SET_FLAGS 1 -#define HAVE_ST_DB_ENV_CLOSE 1 -#define HAVE_ST_DB_ENV_SET_ALLOC 1 -#define HAVE_ST_DB_ENV_SET_ERRCALL 1 -#define HAVE_ST_DB_ENV_LSN_RESET 1 -#define HAVE_ST_DB_ENV_FILEID_RESET 1 -#define HAVE_ST_DB_ENV_FAILCHK 1 -#define HAVE_ST_DB_ENV_REP_SYNC 1 -#define HAVE_ST_DB_ENV_REP_STAT 1 -#define HAVE_DB_ENV_SET_FUNC_YIELD 1 -#define HAVE_DB_ENV_SET_FUNC_SLEEP 1 -#define HAVE_DB_ENV_CREATE 1 -#define HAVE_ST_DB_ENV_OPEN 1 -#define HAVE_DB_ENV_ERRCALL_3 1 -#define HAVE_ST_DB_ENV_LOG_STAT 1 -#define HAVE_ST_DB_ENV_LOG_ARCHIVE 1 -#define HAVE_DB_CURSOR_4 1 -#define HAVE_DB_ENV_REP_ELECT_4 1 -#define HAVE_DB_ENV_REP_PROCESS_MESSAGE_5 1 -#define HAVE_ST_DB_LOG_STAT_ST_LG_BSIZE 1 -#define HAVE_ST_DB_LOG_STAT_ST_LG_SIZE 1 -#define HAVE_ST_DB_LOG_STAT_ST_WCOUNT_FILL 1 -#define HAVE_ST_DB_LOG_STAT_ST_DISK_FILE 1 -#define HAVE_ST_DB_LOG_STAT_ST_DISK_OFFSET 1 -#define HAVE_ST_DB_LOG_STAT_ST_MAXCOMMITPERFLUSH 1 -#define HAVE_ST_DB_LOG_STAT_ST_MINCOMMITPERFLUSH 1 -#define HAVE_ST_DB_BTREE_STAT_BT_NKEYS 1 -#define HAVE_ST_DB_BTREE_STAT_BT_NDATA 1 -#define HAVE_ST_DB_BTREE_STAT_BT_PAGECNT 1 -#define HAVE_DB_STAT_4 1 -#define HAVE_DB_CURSOR_4 1 -#define HAVE_ST_DB_ENV_LOCK_ID_FREE 1 -#define HAVE_ST_DB_ENV_LOCK_ID 1 -#define HAVE_ST_DB_ENV_LOCK_DETECT 1 -#define HAVE_ST_DB_ENV_LOCK_STAT 1 -#define HAVE_ST_DB_ENV_LOCK_GET 1 -#define HAVE_ST_DB_ENV_LOCK_VEC 1 -#define HAVE_ST_DB_ENV_LOCK_PUT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_ID 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCK_NOWAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCK_WAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_OBJS_NOWAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_OBJS_WAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCKERS_NOWAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCKERS_WAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCKS_NOWAIT 1 -#define HAVE_ST_DB_LOCK_STAT_ST_LOCKS_WAIT 1 -#define HAVE_ST_DB_LOCKREQ_TIMEOUT 1 -#define HAVE_ST_DB_TXN_ABORT 1 -#define HAVE_ST_DB_TXN_COMMIT 1 -#define HAVE_ST_DB_TXN_ID 1 -#define HAVE_ST_DB_TXN_PREPARE 1 -#define HAVE_ST_DB_TXN_DISCARD 1 -#define HAVE_ST_DB_TXN_SET_TIMEOUT 1 -#define HAVE_ST_DB_TXN_SET_NAME 1 -#define HAVE_ST_DB_ENV_TXN_BEGIN 1 -#define HAVE_ST_DB_ENV_TXN_CHECKPOINT 1 -#define HAVE_ST_DB_ENV_TXN_RECOVER 1 -#define HAVE_ST_DB_ENV_TXN_STAT 1 -#define HAVE_ST_DB_ENV_DBREMOVE 1 -#define HAVE_ST_DB_ENV_DBRENAME 1 -#define HAVE_ST_DB_ENV_SET_TX_MAX 1 -#define HAVE_ST_DB_TXN_STAT_ST_MAXNACTIVE 1 -#define HAVE_ST_DB_TXN_STAT_ST_REGSIZE 1 -#define HAVE_ST_DB_TXN_STAT_ST_REGION_WAIT 1 -#define HAVE_ST_DB_TXN_STAT_ST_REGION_NOWAIT 1 -#define HAVE_ST_DB_TXN_STAT_ST_LAST_CKP 1 -#define HAVE_ST_DB_TXN_STAT_ST_NRESTORES 1 -#define HAVE_ST_DB_TXN_ACTIVE_TID 1 -#define HAVE_ST_DB_TXN_ACTIVE_NAME 1 -#define HAVE_ST_DB_TXN_ACTIVE_PARENTID 1 -#define HAVE_ENV_REP_TRANSPORT_6 1 -#define HAVE_DB_ENV_REP_PROCESS_MESSAGE_ENVID 1 -#define HAVE_DBXML_INTERFACE 0 -#define HAVE_CONST_DB_CACHED_COUNTS 0 -#define HAVE_CONST_DB_CHECKPOINT 0 -#define HAVE_CONST_DB_CHKSUM_SHA1 0 -#define HAVE_CONST_DB_CLIENT 0 -#define HAVE_CONST_DB_CONFIG 0 -#define HAVE_CONST_DB_CURLSN 0 -#define HAVE_CONST_DB_FIXEDLEN 0 -#define HAVE_CONST_DB_HOME 0 -#define HAVE_CONST_DB_INCOMPLETE 0 -#define HAVE_CONST_DB_LOCK_CONFLICT 0 -#define HAVE_CONST_DB_LOCK_NOTHELD 0 -#define HAVE_CONST_DB_LOG_AUTO_REMOVE 0 -#define HAVE_CONST_DB_LOG_DIRECT 0 -#define HAVE_CONST_DB_LOG_DSYNC 0 -#define HAVE_CONST_DB_LOG_IN_MEMORY 0 -#define HAVE_CONST_DB_LOG_ZERO 0 -#define HAVE_CONST_DB_MPOOL_CLEAN 0 -#define HAVE_CONST_DB_MPOOL_PRIVATE 0 -#define HAVE_CONST_DB_PAD 0 -#define HAVE_CONST_DB_RECORDCOUNT 0 -#define HAVE_CONST_DB_REP_FULL_ELECTION 0 -#define HAVE_CONST_DB_REP_LOGSONLY 0 -#define HAVE_CONST_DB_REP_OUTDATED 0 -#define HAVE_CONST_DB_VERB_CHKPOINT 0 -#define HAVE_CONST_DB_REP_CONF_LEASE 0 -#define HAVE_CONST_DB_REP_HEARTBEAT_MONITOR 0 -#define HAVE_CONST_DB_REP_HEARTBEAT_SEND 0 -#define HAVE_TYPE_DB_INFO 0 -#define HAVE_ST_DB_HASH_STAT_HASH_NRECS 0 -#define HAVE_ST_DB_HASH_STAT_HASH_NELEM 0 -#define HAVE_ST_DB_QUEUE_STAT_QS_NRECS 0 -#define HAVE_ST_DB_QUEUE_STAT_QS_START 0 -#define HAVE_ST_DB_SET_Q_EXTENDSIZE 0 -#define HAVE_ST_DB_BYTESWAPPED 0 -#define HAVE_ST_DB_SET_CACHE_PRIORITY 0 -#define HAVE_ST_DB_ENV_GET_REP_LIMIT 0 -#define HAVE_ST_DB_ENV_GET_REP_NSITES 0 -#define HAVE_ST_DB_ENV_GET_TAS_SPINS 0 -#define HAVE_ST_DB_ENV_LG_INFO 0 -#define HAVE_ST_DB_ENV_SET_REP_TRANSPORT 0 -#define HAVE_ST_DB_ENV_SET_TXN_TIMEOUT 0 -#define HAVE_ST_DB_ENV_SET_LOCK_TIMEOUT 0 -#define HAVE_ST_DB_ENV_SET_REP_LIMIT 0 -#define HAVE_ST_DB_ENV_REPMGR_SET_SITE_LIST 0 -#define HAVE_ST_DB_ENV_SET_INTERMEDIATE_DIR_MODE 0 -#define HAVE_ST_DB_ENV_SET_REGION_INIT 0 -#define HAVE_ST_DB_ENV_SET_TAS_SPINS 0 -#define HAVE_ST_DB_ENV_DB_VERBOSE 0 -#define HAVE_ST_DB_ENV_SET_LK_MAX 0 -#define HAVE_ST_DB_ENV_LG_MAX 0 -#define HAVE_ST_DB_ENV_SET_SERVER 0 -#define HAVE_ST_DB_ENV_SET_FUNC_SLEEP 0 -#define HAVE_ST_DB_ENV_SET_FUNC_YIELD 0 -#define HAVE_ST_DB_ENV_LOG_SET_CONFIG 0 -#define HAVE_ST_DB_ENV_FIDP 0 -#define HAVE_ST_DB_ENV_REP_SET_CLOCKSKEW 0 -#define HAVE_ST_DB_ENV_REP_SET_REQUEST 0 -#define HAVE_DB_ENV_SET_REGION_INIT 0 -#define HAVE_DB_APPINIT 0 -#define HAVE_DB_JUMP_SET 0 -#define HAVE_ENV_OPEN_DB_CONFIG 0 -#define HAVE_ENV_REMOVE_4 0 -#define HAVE_ST_DB_ENV_LOG_REGISTER 0 -#define HAVE_DB_LOG_REGISTER_4 0 -#define HAVE_DB_LOG_REGISTER 0 -#define HAVE_ST_DB_ENV_LOG_UNREGISTER 0 -#define HAVE_DB_LOG_UNREGISTER 0 -#define HAVE_DB_ENV_REP_ELECT_7 0 -#define HAVE_DB_ENV_REP_ELECT_5 0 -#define HAVE_DB_ENV_REP_PROCESS_MESSAGE_4 0 -#define HAVE_ST_DB_LOG_STAT_ST_REFCNT 0 -#define HAVE_ST_DB_LOG_STAT_ST_LG_MAX 0 -#define HAVE_ST_DB_LOG_STAT_ST_FLUSHCOMMIT 0 -#define HAVE_ST_DB_BTREE_STAT_BT_NRECS 0 -#define HAVE_ST_DB_ENV_LK_INFO 0 -#define HAVE_ST_DB_LOCK_STAT_ST_LASTID 0 -#define HAVE_ST_DB_LOCK_STAT_ST_NNOWAITS 0 -#define HAVE_ST_DB_LOCK_STAT_ST_NCONFLICTS 0 -#define HAVE_ST_DB_ENV_TX_INFO 0 -#define HAVE_ST_DB_TXN_STAT_ST_PENDING_CKP 0 -#define HAVE_TXN_RECOVER 0 diff -Nru ruby-bdb-0.6.5/src/bdb.h ruby-bdb-0.6.6/src/bdb.h --- ruby-bdb-0.6.5/src/bdb.h 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/src/bdb.h 2011-04-06 19:35:39.000000000 +0000 @@ -1,9 +1,13 @@ +#include +#include + #include +#ifdef HAVE_RUBY_IO_H +#include +#else #include #include - -#include -#include +#endif #include "bdb_features.h" diff -Nru ruby-bdb-0.6.5/src/common.c ruby-bdb-0.6.6/src/common.c --- ruby-bdb-0.6.5/src/common.c 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/src/common.c 2011-04-06 19:35:39.000000000 +0000 @@ -941,7 +941,7 @@ } } if (!(dbst->options & BDB_NOT_OPEN)) { - bdb_test_error(dbst->dbp->close(dbst->dbp, flags)); + dbst->dbp->close(dbst->dbp, flags); } } else { @@ -950,7 +950,7 @@ bdb_ary_delete(&envst->db_ary, dbst->ori_val); } if (!(dbst->options & BDB_NOT_OPEN)) { - bdb_test_error(dbst->dbp->close(dbst->dbp, flags)); + dbst->dbp->close(dbst->dbp, flags); } } } diff -Nru ruby-bdb-0.6.5/src/env.c ruby-bdb-0.6.6/src/env.c --- ruby-bdb-0.6.5/src/env.c 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/src/env.c 2011-04-06 19:35:39.000000000 +0000 @@ -364,8 +364,8 @@ if (TYPE(res) != T_ARRAY || RARRAY_LEN(res) != 2) { rb_raise(bdb_eFatal, "expected [pid, threadid]"); } - *pid = NUM2INT(RARRAY_PTR(res)[0]); - *tid = NUM2INT(RARRAY_PTR(res)[0]); + *pid = NUM2LONG(RARRAY_PTR(res)[0]); + *tid = (db_threadid_t)NUM2LONG(RARRAY_PTR(res)[0]); return; } @@ -384,11 +384,11 @@ GetIdEnv(obj, envst); if (NIL_P(envst->thread_id_string)) { - snprintf(buf, DB_THREADID_STRLEN, "%d/%d", pid, (int)tid); + snprintf(buf, DB_THREADID_STRLEN, "%d/%ld", pid, (long)tid); return buf; } - a = INT2NUM(pid); - b = INT2NUM(tid); + a = LONG2NUM(pid); + b = LONG2NUM((long)tid); if (envst->thread_id_string == 0) { res = rb_funcall(obj, id_thread_id_string, 2, a, b); } @@ -418,8 +418,8 @@ if (NIL_P(envst->isalive)) { return 0; } - a = INT2NUM(pid); - b = INT2NUM(tid); + a = LONG2NUM(pid); + b = LONG2NUM((long)tid); c = INT2NUM(flags); if (envst->isalive == 0) { res = rb_funcall(obj, id_isalive, 3, a, b, c); @@ -1903,9 +1903,9 @@ #endif #if HAVE_ST_DB_ENV_GET_MP_MMAPSIZE if (strcmp(str, "mp_mmapsize") == 0) { - u_int32_t size; + size_t size; bdb_test_error(envst->envp->get_mp_mmapsize(envst->envp, &size)); - return INT2NUM(size); + return LONG2NUM(size); } #endif #if HAVE_ST_DB_ENV_GET_OPEN_FLAGS @@ -1981,7 +1981,7 @@ #endif #if HAVE_ST_DB_ENV_REP_GET_PRIORITY if (strcmp(str, "rep_priority") == 0) { - size_t size = 0; + int size = 0; bdb_test_error(envst->envp->rep_get_priority(envst->envp, &size)); return INT2NUM(size); } @@ -2448,7 +2448,7 @@ bdb_env_rep_get_nsites(VALUE obj, VALUE a) { bdb_ENV *envst; - u_int32_t offon; + int offon; GetEnvDB(obj, envst); bdb_test_error(envst->envp->rep_get_nsites(envst->envp, &offon)); @@ -2473,7 +2473,7 @@ bdb_env_rep_get_priority(VALUE obj, VALUE a) { bdb_ENV *envst; - u_int32_t offon; + int offon; GetEnvDB(obj, envst); bdb_test_error(envst->envp->rep_get_priority(envst->envp, &offon)); diff -Nru ruby-bdb-0.6.5/src/extconf.rb ruby-bdb-0.6.6/src/extconf.rb --- ruby-bdb-0.6.5/src/extconf.rb 2011-05-25 08:07:14.000000000 +0000 +++ ruby-bdb-0.6.6/src/extconf.rb 2011-04-06 19:35:39.000000000 +0000 @@ -18,8 +18,9 @@ --with-db-lib= default=/usr/lib - --with-db-version= - default=-4.2,42,-4.1,41,-4.0,-4,40,4,3,2, + --with-db-version= + default=auto-detected if above values include one, or suffixes + of all supported versions) --with-db-uniquename= option --with-uniquename=NAME when Berkeley DB was build @@ -43,7 +44,7 @@ Config::expand(CONFIG["archdir"].dup)) end -_,lib_dir = dir_config("db", "/usr/include", "/usr/lib") +inc_dir, lib_dir = dir_config("db", "/usr/include", "/usr/lib") case Config::CONFIG["arch"] when /solaris2/ $DLDFLAGS ||= "" @@ -53,31 +54,49 @@ $CFLAGS += " -DBDB_NO_THREAD_COMPILE" if enable_config("thread") == false -unique = if with_config("db-uniquename") - with_config("db-uniquename") - else - "" - end +unique = with_config("db-uniquename") || '' if with_config("db-pthread") $LDFLAGS += " -lpthread" end -version = with_config('db-version', "-4.7,47,-4.6,46,-4.5,45,-4.4,44,-4.3,43,-4.2,42,-4.1,41,-4.0,-4,40,4,3,2,").split(/,/, -1) -version << "" if version.empty? +if csv = with_config('db-version') + version = csv.split(',', -1) + version << '' if version.empty? +elsif m = lib_dir.match(%r{/db(?:([2-9])|([2-9])([0-9])|-([2-9]).([0-9]))(?:$|/)}) || + inc_dir.match(%r{/db(?:([2-9])|([2-9])([0-9])|-([2-9]).([0-9]))(?:$|/)}) + if m[1] + version = [m[1], ''] + else + if m[2] + major, minor = m[2], m[3] + else + major, minor = m[4], m[5] + end + version = ['-%d.%d' % [major, minor], '%d%d' % [major, minor], ''] + end +else + version = [ + %w[4.7 4.6 4.5 4.4 4.3 4.2 4.1 4.0 4 3 2].map { |ver| + major, minor = ver.split('.') + minor ? ['-%d.%d' % [major, minor], '%d%d' % [major, minor]] : major + }, '' + ].flatten +end catch(:done) do pthread = /-lpthread/ =~ $LDFLAGS loop do version.each do |with_ver| - if unique != true + if unique.is_a?(String) db_version = "db_version" + unique throw :done if have_library("db#{with_ver}", db_version, "db.h") end - if with_ver != "" && (unique == "" || unique == true) - /(\d)\.?(\d)?/ =~ with_ver - major = $1.to_i - minor = $2.to_i + next if with_ver.empty? + if !unique.is_a?(String) || unique.empty? + m = with_ver.match(/^[^0-9]*([2-9])\.?([0-9]{0,3})/) + major = m[1].to_i + minor = m[2].to_i db_version = "db_version_" + (1000 * major + minor).to_s throw :done if have_library("db#{with_ver}", db_version, "db.h") end @@ -87,9 +106,15 @@ pthread = true puts 'Trying with -lpthread' end - raise "libdb#{version[-1]} not found" + raise "libdb#{version.last} not found" end +headers = ["ruby.h"] +if have_header("ruby/io.h") + headers << "ruby/io.h" +else + headers << "rubyio.h" +end ["rb_frame_this_func", "rb_block_proc", "rb_io_stdio_file", "rb_block_call"].each do |f| have_func(f, "ruby.h") end @@ -103,8 +128,7 @@ puts "no" end end - -have_type('rb_io_t', ['ruby.h', 'rubyio.h']) +have_type('rb_io_t', headers) if enable_config('db-xml') $defs << '-DHAVE_DBXML_INTERFACE' @@ -112,7 +136,7 @@ $defs << '-DNOT_HAVE_DBXML_INTERFACE' end -require 'features' +require './features' create_makefile("bdb") if unknown @@ -130,3 +154,9 @@ make.close end end + +# Local variables: +# ruby-indent-tabs-mode: nil +# ruby-indent-level: 3 +# end: +# vim: sw=3