See: Description
Class | Description |
---|---|
TableAPIExample |
This file includes a number of examples that demonstrate some of the
features of tables and secondary indexes in Oracle NoSQL Database.
|
All example Java code is in the single class TableAPIExample
.
There are a number of independent example functions in that class. These
can be run together or independently. They have no interactions.
java -jar lib/kvstore.jar kvliteThis creates a store named "kvstore" on localhost on port 5000. If you use another store or other parameters, adjust the instructions below accordingly. By default this creates a store in a new "kvroot" directory in your current directory. The location can be changed using additional parameters.
java -jar lib/kvstore.jar runadmin -host localhost -port 5000 load -file \ create_tables.kvsThis will take a minute or so.
javac -d . -cp/lib/kvclient.jar TableAPIExample.java
java -cp .:By default all examples are run. More than one example can be run in a single invocation by using the -example flag multiple times./lib/kvclient.jar table.TableAPIExample \ [-host localhost] [-port 5000] [-store kvstore] [-example <1-9>]* All parameters have default values: store -- kvstore host -- localhost port -- 5000
java -jar lib/kvstore.jar runadmin -host localhost -port 5000 load -file \ evolve_tables.kvs
After running the examples run the remove_tables.kvs script to clear the tables from the database. This removes all data as well.
java -jar lib/kvstore.jar runadmin -host localhost -port 5000 load -file \ remove_tables.kvs
Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.