Rechercher une page de manuel
Sleepycat::XmlContainer.3pm
Langue: en
Version: 2008-10-21 (fedora - 05/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
XmlContainer - A Perl interface to the DbXml XmlContainer ClassSYNOPSIS
use Sleepycat::DbXml; my $mgr = new XmlManager; my $c = $mgr->createContainer([$txn,] $name [, $flags, $containerType, $mode]); my $bool = $c->addAlias($alias); my $bool = $c->removeAlias($alias); $c->addIndex([$txn,] $uri, $name, $index [$context]) $c->addDefaultIndex([$txn,] $index [$context]) $c->deleteDocument([$txn,] $name [, $context]); $c->deleteDocument([$txn,] $xmldoc [, $context]); $c->deleteIndex([$txn,] $uri, $name, $index [$context]) $c->deleteDefaultIndex([$txn,] $index [$context]) my $type = $c->getContainerType(); my $xmldoc = $c->getDocument([$txn,] $name [, $flags]); my $bool = $c->getIndexNodes(); my $ixSpec = $c->getIndexSpecification([$txn, [$flags]]) my $mgr1 = $c->getManager() my $name = $c->getName() my $flags = $c->getFlags() my $results = $c->lookupIndex([$txn,] $context, $uri, $name, $index, $xmlValue, $flags); my $results = $c->lookupIndex([$txn,] $context, $uri, $name, $parent_uri, $parent_name, $index, $xmlValue, $flags); my $statistics = $c->lookupStatistics([$txn,] $uri, $name, $index [,$xmlValue]); my $statistics = $c->lookupStatistics([$txn,] $uri, $name, $parent_uri, $parent_name, $index [,$xmlValue]); $c->putDocument([$txnid,] $xmldoc [, $context [, $flags]]); $c->putDocument([$txnid,] $name, $xmlstream [, $context [, $flags]]); $c->putDocument([$txnid,] $name, $xmleventreader [, $context [, $flags]]); $c->putDocument([$txnid,] $name, $text [, $context [, $flags]]); my $xmlWriter = $c->putDocumentAsEventWriter($xmlDocument, $context [, $flags]]); $c->replaceIndex([$txn, ] $uri, $name, $index [, $context]); $c->setIndexSpecification([$txn, ] $index [, $context]); $c->sync(); $c->updateDocument([$txn, ] $xmldoc [, $context]); my $results = $c->getAllDocuments([$txn,] $flags); my $count = $c->getNumDocuments([$txn]);
DESCRIPTION
This moduleCONFORMANCE to C++ API
The Perl interface to XMlContainer is identical to the C++ API, apart from the following- 1.
- The use of the TxnId parameter is optional.
Constructor
The constructor for this class can take any of the following formsmy $mgr = new XmlManager; my $c = $mgr->createContainer([$txn,] $name [, $flags, $containerType, $mode]);
Methods
$c->putDocument([$txnid,] $xmldoc [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $xmlstream [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $xmleventreader [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $text [, $context [, $flags]]);
$c->putDocument([$txnid,] $xmldoc [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $xmlstream [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $xmleventreader [, $context [, $flags]]); =head2 $c->putDocument([$txnid,] $name, $text [, $context [, $flags]]);
Puts a document into a container. The input can take one of four forms
- $xmldoc --- an XmlDocument object
- $name => $xmlstream --- a name and XmlStream object pair.
- $name => $xmleventreader --- a name and XmlEventReader object pair.
- $name => $text --- a name and text pair.
If present, the $context parameter must be an XmlUpdateContext object.
If present, the $flags parameter must be
my $xmlWriter = $c->putDocumentAsEventWriter($xmlDocument, $context [, $flags]]);
my $doc = $c->getDocument([$txnid,] $name [, $flags]);
my $doc = $c->getDocument([$txnid,] $name [, $flags]);
Returns an XmlDocument object from the container with name $name. ID, $id.
Valid values for the flags parameter are:
- Db::DB_DIRTY_READ
- Db::DB_RMW =item DbXml::DBXML_LAZY_LOCKS
my $bool = $c->getIndexNodes();
my $bool = $c->getIndexNodes();
Returns true if the container $c is configured to create indexes at node granularity.
$c->deleteDocument([$txnid,] $name [, $context]);
$c->deleteDocument([$txnid,] $name [, $context]);
Removes the document with name, $name, from the container, $c.
If present, the $context parameter must be an XmlUpdateContext object.
The $flags parameter is currently unused.
$c->deleteDocument([$txnid,] $doc [, $context]);
$c->deleteDocument([$txnid,] $doc [, $context]);
Removes the document that matches the one in the XmlDocument object, $doc, from the container, $c.
If present, the $context parameter must be an XmlUpdateContext object.
The $flags parameter is currently unused.
$c->updateDocument([$txnid,] $doc [, $context]);
$c->updateDocument([$txnid,] $doc [, $context]);
Updates document $doc in container $c.
If present, the $context parameter must be an XmlUpdateContext object.
my $string = $c->getName;
my $string = $c->getName;
Returns the name of the XmlContainer, $c.
my $flags = $c->getFlags;
my $flags = $c->getFlags;
Returns the flags used when openeing the XmlContainer, $c.
my $bool = $c->addAlias($alias);
my $bool = $c->addAlias($alias);
Creates an alias for the container.
my $bool = $c->removeAlias($alias);
my $bool = $c->removeAlias($alias);
Removes the alias $alias from the container.
my $results = $c->getAllDocuments([$txn,] $flags);
my $results = $c->getAllDocuments([$txn,] $flags);
Returns an XmlResults object that can will iterate over all the documents stored in the container, $c.
my $count = $c->getNumDocuments([$txn]);
my $count = $c->getNumDocuments([$txn]);
Returns a count of the number of documents in the container, $c.
NOTES
EXAMPLES
SEE ALSO
AUTHOR
Paul MarquessContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre