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.
allocate(name = nil, options = {})
dump(name, filename)
load(name, filename)
remove(name)
rename(name, newname)
salvage(name, filename, flags = 0)
set_name(name, str)
verify(name)
close(flags = 0)
delete(document, flags = 0)
environment
env
environment?
env?
each {|doc| ... }
self[id]
get(id, flags = 0)
self[id] = document
index=(index)
index
Retrieve the BDB::XML::Index
Return nil if no indexing was specified
initialize(name, flags = 0, mode = 0)
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
name=(str)
open?
parse(query, context = nil)
push(document, flags = 0)
<<(document)
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
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
in_transaction?
transaction?
update(document)
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