Getting Help

The BDB XML shell has a built in help facility, simply type help at the command line:


The text displayed by the help command changes frequently, and so what you see in your version of the BDB XML shell may differ from what is shown below.

dbxml> help

Command Summary

#                 - Comment. Does nothing
abort             - Aborts the current transaction
addAlias          - Add an alias to the default container
addIndex          - Add an index to the default container
commit            - Commits the current transaction, and starts a new one
compactContainer  - Compact a container to shrink it's size
contextQuery      - Execute query expression using the last results as 
                    the context item
cquery            - Execute an expression in the context of the default 
createContainer   - Creates a new container, which becomes the default 
debug             - Debug the given query expression, or the default 
                    pre-parsed query
debugOptimization - Debug optimization command -- internal use only
delIndex          - Delete an index from the default container
echo              - Echo to output
getDocuments      - Gets document(s) by name from default container
getMetaData       - Get a metadata item from the named document
help              - Print help information.  Use 'help commandName' for 
                    extended help
info              - Get info on default container
listIndexes       - List all indexes in the default container
lookupEdgeIndex   - Performs an edge index lookup in the default container
lookupIndex       - Performs an index lookup in the default container
lookupStats       - Look up index statistics on the default container
openContainer     - Opens a container, and uses it as the default 
preload           - Pre-loads (opens) a container
prepare           - Prepare the given query expression as the default 
                    pre-parsed query
print             - Prints most recent results, optionally to a file
putDocument       - Insert a document into the default container
query             - Execute the given query expression, or the default 
                    pre-parsed query
queryPlan         - Prints the query plan for the specified query 
quit              - Exit the program
reindexContainer  - Reindex a container, optionally changing index type
removeAlias       - Remove an alias from the default container
removeContainer   - Removes a container
removeDocument    - Remove a document from the default container
run               - Runs the given file as a script
setAutoIndexing   - Set auto-indexing state of the default container
setBaseUri        - Set/get the base uri in the default context
setIgnore         - Tell the shell to ignore script errors
setLazy           - Sets lazy evaluation on or off in the default context
setMetaData       - Set a metadata item on the named document
setNamespace      - Create a prefix->namespace binding in the default 
setProjection     - Enables or disables the use of the document 
                    projection optimization
setQueryTimeout   - Set a query timeout in seconds in the default context
setReturnType     - Sets the return type on the default context
setTypedVariable  - Set a variable to the specified type in the default 
setVariable       - Set a variable in the default context
setVerbose        - Set the verbosity of this shell
sync              - Sync current container to disk
time              - Wrap a command in a wall-clock timer
transaction       - Create a transaction for all subsequent operations 
                    to use
upgradeContainer - Upgrade a container to the current container format 

Any given command has additional detailed help. For example:

dbxml> help createContainer
createContainer -- Creates a new container, which becomes the default 

Usage: createContainer <containerName> [n|in|d|id] [[no]validate]
Creates a new default container; the old default is closed.
The default is to create a node storage container, with node indexes.
A second argument of "d" creates a Wholedoc storage container, and
"id" creates a document storage container with node indexes.
A second argument of "n" creates a node storage container, and
"in" creates a node storage container with node indexes.
The optional third argument indicates whether or not to validate
documents on insertion
A containerName of "" creates an in-memory container.
This command uses the XmlManager::createContainer() method.  

The help text has valuable information about the command and the API calls that are used to implement a particular command. This helps you to find the relevant section of the API documentation where more detail is available and also serves as a way to explore a commonly used subset of the API calls in an interactive fashion.


The debug command provides a debugging facility for XQueries. However, it is currently only useful for developers with a deep understanding of query plans. That said, you can try out the debugger by typing:

debug xquery

where xquery is the query that you want to debug. (XQueries are described in the next chapter of this manual).

Once in the debugger, you can get debugger-specific help by using the help command. Use the step command to step forward one instruction in the query plan. Use run to execute the remainder of the query plan.