Creating, Reading, Updating, and Deleting Documents and Tables with the MapR-DB JSON Java API Library
The basic tasks that you can perform with the API library involve the
Admin
, Document
, DocumentMutation
,
QueryCondition
, Table
, and TableDescriptor
interfaces.
Admin
- Create JSON tables
- Alter JSON tables
- Delete JSON tables
- List JSON tables in a folder
- Check whether a JSON table exists
- Creating JSON Tables with the MapR-DB OJAI Java API Library
- Listing Tables with the MapR-DB JSON Java API Library
- Altering JSON Tables with the MapR-DB OJAI Java API Library
- Deleting JSON Tables with the MapR-DB OJAI Java API Library
Admin
. Document
Use the methods in this interface to create OJAI documents. You can pass
Document
objects to methods in the Table
interface to
add documents to tables, replace documents in tables, and delete documents from tables.
Table.checkAndDelete()
Table.checkAndMutate()
Table.checkAndReplace()
Table.insert()
Table.insertOrReplace()
Table.replace()
Document
. DocumentMutation
Use the methods in this interface to specify changes to make to OJAI documents. You can
pass DocumentMutation
objects to the
Table.checkAndMutate()
method or the Table.update()
method to apply the changes to documents.
DocumentMutation.append()
DocumentMutation.delete()
DocumentMutation.increment()
DocumentMutation.merge()
DocumentMutation.set()
DocumentMutation.setNull()
DocumentMutation.setOrReplace()
DocumentMutation.setOrReplaceNull()
DocumentMutation
. QueryCondition
Use the methods in this interface to specify conditions for returning results from queries on tables. See Querying with Conditions for more information.
Table
- Delete documents from tables
- Increment numeric values in documents
- Insert documents into tables
- Query tables to find documents
- Replace documents
- Update documents with the changes specified in
DocumentMutation
objects
Table.checkAndDelete()
Table.checkAndMutate()
Table.checkAndReplace()
Table.delete()
Table.increment()
Table.insert()
Table.insertOrReplace()
Table.replace()
Table.update()
Table
. TableDescriptor
- Create tables with non-default values for one or more of their parameters
- Alter tables
- Creating JSON Tables with the MapR-DB OJAI Java API Library
- Altering JSON Tables with the MapR-DB OJAI Java API Library
TableDescriptor
in the Javadoc.