Berkeley DB XML Reference Card
Berkeley DB XML Reference Card
Berkeley DB XML Reference Card
DbEnv
Constructor flags:
DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_RECOVER
Methods:
open($dir [,flags] [,mode]) close($flags)
DbXml
Class methods:
setLogCategory(category, bool)
categories: CATEGORY_MANAGER, CATEGORY_CONTAINER, CATEGORY_INDEXER, CATEGORY_QUERY, CATEGORY_OPTIMIZER, CATEGORY_DICTIONARY, CATEGORY_NODESTORE, CATEGORY_ALL LEVEL_DEBUG, LEVEL_INFO, LEVEL_WARNING, LEVEL_ERROR, LEVEL_ALL
XmlContainer
Methods:
addAlias(alias) addIndex([txn,] uri, name, index, ucontext) addDefaultIndex([txn,] index, ucontext) deleteDocument([txn,] name (or document), ucontext) deleteIndex([txn,] uri, name, index, ucontext) deleteDefaultIndex([txn,] index, ucontext) getAllDocuments([txn,] flags)
flags: DBXML_LAZY_DOCS, DB_RMW, DBXML_REVERSE_ORDER, DB_DEGREE_2, DB_DIRTY_READ
XmlIndexSpecification
Methods:
addIndex(uri, name, index) addDefaultIndex(index) deleteIndex(uri, name, index) deleteDefaultIndex(index) find(uri, name, index*) getDefaultIndex() next() replaceIndex(uri, name, index) replaceDefaultIndex(index) reset()
setLogLevel(level, bool)
levels:
XmlManager
Constructor args:
[dbenv] [,flags]
Constructor flags:
DBXML_ALLOW_EXTERNAL_ACCESS, DBXML_ALLOW_AUTO_OPEN, DBXML_ADOPT_DBENV
Methods:
createContainer([txn,] name, [,flags] [,type] [,mode])
flags: DB_CREATE, DB_EXCL, DB_RDONLY, DB_DIRTY_READ, DB_NOMMAP, DB_THREAD, DB_XA_CREATE, DB_TXN_NOT_DURABLE, DBXML_CHKSUM, DBXML_ENCRYPT, DBXML_INDEX_NODES, DBXML_TRANSACTIONAL, DBXML_ALLOW_VALIDATION XmlContainer::NodeContainer, XmlContainer::WholedocContainer
types:
getIndexNodes() getIndexSpecification([txn,] flags) getManager() getName() getNumDocuments([txn]) getPageSize() lookupStatistics([txn,] uri, name, parent_uri, parent_name, index [,val]) putDocument([txn,] name, stream (or content), ucontext [,flags]) putDocument([txn,] name, document, ucontext [,flags])
flags: DBXML_GEN_NAME
XmlQueryContext
Methods:
clearNamespaces() removeNamespace(prefix) setDefaultCollection(uri) setNamespace(prefix, uri) setBaseURI(uri) setEvaluationType(type)
types: XmlQueryContext::Eager, XmlQueryContext::Lazy
removeAlias(alias) replaceIndex([txn,] uri, name, index, ucontext) replaceDefaultIndex([txn,] index, ucontext) setIndexSpecification([txn,] indexspec, ucontext) sync() updateDocument([txn,] document, ucontext)
setReturnType(type)
types: XmlQueryContext::LiveValues, XmlQueryContext::DeadValues
setVariableValue(name, value)
XmlQueryExpression
Methods:
execute([txn,] [contextitem,] qcontext, flags)
flags: DBXML_LAZY_DOCS, DB_DIRTY_READ, DB_DEGREE_2. DB_RMW
XmlDocument
Methods:
fetchAllData() getContent() getContentAsDOM() getContentAsXmlInputStream() getMetaData(uri, name, value) getMetaDataIterator() getName() removeMetaData(uri, name) setContent(content (or xmldata or stream)) setContentAsDOM(xercesdom) setContentAsXmlInputStream(stream) setMetaData(uri, name, string (or xmlvalue)) setName(name)
createURLInputStream(baseid, systemid [,publicid]) createUpdateContext() dumpContainer(name, outfile) existsContainer(name) getDbEnv() getHome() loadContainer(name, inputstream, lineno, ucontext) openContainer([txn,] name [,flags] [,type] [,mode]) prepare([txn,] query, qcontext) query(txn,] query, qcontext, flags)
flags: DBXML_LAZY_DOCS, DB_DEGREE_2, DB_DIRTY_READ, DB_RMW
getQuery() getQueryPlan()
XmlResults
Methods:
add(xmlvalue) hasNext() hasPrevious() next(xmlvalue (or document)*) peek(xmlvalue (or document)*) previous(xmlvalue (or document)*) reset() size() Copyright 2006 by Danny Brian
XmlException
Methods:
what() getExceptionCode() getDbError()
createChild() getDbTxn()
XmlUpdateContext
Methods:
setApplyChangesToContainers(bool) getApplyChangesToContainers()
XmlModify
Methods:
addAppendStep(expr, type, name, content [,location]) addInsertAfterStep(expr, type, name, content) addInsertBeforeStep(expr, type, name, content)
types: XmlModify::Element, ::Attribute, ::Text, ::ProcessingInstruction, ::Comment
Methods:
getType() isType(type) isBoolean() isBinary() isNumber() isString() isNode() isNull() asBoolean() asBinary() asDocument() asNode() asNumber() asString() equals(value) getNodeName() getNodeValue() getNamespaceURI() getPrefix() getLocalName() getNodeType() getParentNode() getFirstChild() getLastChild() getPreviousSibling() getNextSibling() getAttributes() getOwnerElement()
XmlStatistics
Methods:
getNumberOfIndexedKeys() getNumberOfUniqueKeys()
XmlMetaDataIterator
Methods:
next(uri, name, value) reset()
XQuery Functions:
abs(number) adjust-dateTime-to-timezone(dateTime, time zone) adjust-date-to-timezone(date, time zone) adjust-time-to-timezone(time, time zone) avg(seq) base-uri(node) boolean(seq) ceiling(number) codepoints-to-string(sequence) collection(string) compare(string1, string2) concat(string1, ...) contains(string1, string2) count(seq) current-date() current-dateTime() current-time() data(seq) day-from-date(date) day-from-dateTime(dateTime) days-from-duration(duration) dbxml:metadata() deep-equal(seq, seq) default-collation() distinct-values(seq) doc(string) document-uri(node) empty(seq) ends-with(string1, string2) error(item) escape-uri(string, boolean) exactly-one(seq) exists(seq) false() floor(number) hours-from-dateTime(dateTime) hours-from-duration(duration) hours-from-time(time) id(string)* idref(string)* implicit-timezone() index-of(seq, item) in-scope-prefixes(element)insert-before(seq1, position, seq2) lang(string) last() local-name(node) local-name-from-QName(stringQName) lower-case(string) matches(string, pattern) max(seq) min(seq) minutes-from-dateTime(dateTime) minutes-from-duration(duration) minutes-from-time(time) month-from-date(date) month-from-dateTime(dateTime) months-from-duration(duration) name(node) namespace-uri(node) namespace-uri-for-prefix(element, string) namespace-uri-from-QName(QName) node-name(node) normalize-space(string) normalize-unicode(string)not(expr) number(expr) one-or-more(seq) position() QName(namespace, local name) remove(seq, position) replace(string, pattern1, pattern2) resolve-QName(string, element) resolve-uri(string) reverse(seq) root(node) round(number) round-half-to-even(number) seconds-from-dateTime(date) seconds-from-duration(duration) seconds-from-time(time) starts-with(string1, string2) string(item) string-join(seq, delim) string-length(string) string-to-codepoints(string) subsequence(seq, position1, position2) substring(string, position1, position2) substring-after(string1, string2) substring-before(string1, string2) sum(seq) timezone-from-date(date) timezone-from-dateTime(dateTime) timezone-from-time(time) tokenize(string1, string2) trace(seq, string) translate(string1, string2, string3) true() unordered(seq) upper-case(string) year-from-date(date) year-from-dateTime(dateTime) years-from-duration(duration) zero-or-one(seq)