Difference between revisions of "Java Examples"
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
==XQJ API Example== | ==XQJ API Example== | ||
+ | |||
+ | ;[[XQJQuery]] | ||
+ | :runs a query with XQJ. | ||
==XML:DB API Examples== | ==XML:DB API Examples== | ||
+ | ;[[XMLDBCreate]] | ||
+ | :creates a collection with XML:DB. | ||
− | [[ | + | ;[[XMLDBQuery]] |
+ | :runs a query with XML:DB. |
Revision as of 13:09, 7 January 2011
The following Java code snippets demonstrate how easy it is to run database commands, create collections, perform queries, etc. via the BaseX API:
Local Examples
- RunCommands
- creates and drops database and index instances and prints a list of all existing databases.
- WikiExample
- creates a database from a url (wiki instance), runs a queries against it and drops the database.
- RunQueries
- shows three variants of running queries.
- CreateCollection
- creates and manages a collection.
- QueryCollection
- creates, runs queries against it and drops a collection.
Server Examples
- ServerCommands
- launches server-side commands with a client session.
- ServerAndLocal
- processes server results locally.
- ServerConcurrency
- runs concurrent queries.
- UserExample
- manages database users.
XQJ API Example
- XQJQuery
- runs a query with XQJ.
XML:DB API Examples
- XMLDBCreate
- creates a collection with XML:DB.
- XMLDBQuery
- runs a query with XML:DB.