public interface AsyncDocumentClient
AsyncDocumentClient
async APIs return rxJava's Observable
, and so you can use rxJava Observable
functionality.
The async Observable
based APIs perform the requested operation only after
subscription.
The service client encapsulates the endpoint and credentials used to access
the Cosmos DB service.
To instantiate you can use the AsyncDocumentClient.Builder
AsyncDocumentClient client = new AsyncDocumentClient.Builder()
.withServiceEndpoint(serviceEndpoint)
.withMasterKey(masterKey)
.withConnectionPolicy(ConnectionPolicy.GetDefault())
.withConsistencyLevel(ConsistencyLevel.Session)
.build();
Modifier and Type | Interface and Description |
---|---|
static class |
AsyncDocumentClient.Builder
Helper class to build
AsyncDocumentClient instances
as logical representation of the Azure Cosmos DB database service. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this
AsyncDocumentClient instance and cleans up the resources. |
rx.Observable<ResourceResponse<Attachment>> |
createAttachment(String documentLink,
Attachment attachment,
RequestOptions options)
Creates an attachment.
|
rx.Observable<ResourceResponse<Attachment>> |
createAttachment(String documentLink,
InputStream mediaStream,
MediaOptions options,
RequestOptions requestOptions)
Creates an attachment.
|
rx.Observable<ResourceResponse<DocumentCollection>> |
createCollection(String databaseLink,
DocumentCollection collection,
RequestOptions options)
Creates a document collection.
|
rx.Observable<ResourceResponse<Database>> |
createDatabase(Database database,
RequestOptions options)
Creates a database.
|
rx.Observable<ResourceResponse<Document>> |
createDocument(String collectionLink,
Object document,
RequestOptions options,
boolean disableAutomaticIdGeneration)
Creates a document.
|
rx.Observable<ResourceResponse<Permission>> |
createPermission(String userLink,
Permission permission,
RequestOptions options)
Creates a permission.
|
rx.Observable<ResourceResponse<StoredProcedure>> |
createStoredProcedure(String collectionLink,
StoredProcedure storedProcedure,
RequestOptions options)
Creates a stored procedure.
|
rx.Observable<ResourceResponse<Trigger>> |
createTrigger(String collectionLink,
Trigger trigger,
RequestOptions options)
Creates a trigger.
|
rx.Observable<ResourceResponse<User>> |
createUser(String databaseLink,
User user,
RequestOptions options)
Creates a user.
|
rx.Observable<ResourceResponse<UserDefinedFunction>> |
createUserDefinedFunction(String collectionLink,
UserDefinedFunction udf,
RequestOptions options)
Creates a user defined function.
|
rx.Observable<ResourceResponse<Attachment>> |
deleteAttachment(String attachmentLink,
RequestOptions options)
Deletes an attachment.
|
rx.Observable<ResourceResponse<DocumentCollection>> |
deleteCollection(String collectionLink,
RequestOptions options)
Deletes a document collection by the collection link.
|
rx.Observable<ResourceResponse<Conflict>> |
deleteConflict(String conflictLink,
RequestOptions options)
Deletes a conflict.
|
rx.Observable<ResourceResponse<Database>> |
deleteDatabase(String databaseLink,
RequestOptions options)
Deletes a database.
|
rx.Observable<ResourceResponse<Document>> |
deleteDocument(String documentLink,
RequestOptions options)
Deletes a document by the document link.
|
rx.Observable<ResourceResponse<Permission>> |
deletePermission(String permissionLink,
RequestOptions options)
Deletes a permission.
|
rx.Observable<ResourceResponse<StoredProcedure>> |
deleteStoredProcedure(String storedProcedureLink,
RequestOptions options)
Deletes a stored procedure by the stored procedure link.
|
rx.Observable<ResourceResponse<Trigger>> |
deleteTrigger(String triggerLink,
RequestOptions options)
Deletes a trigger.
|
rx.Observable<ResourceResponse<User>> |
deleteUser(String userLink,
RequestOptions options)
Deletes a user.
|
rx.Observable<ResourceResponse<UserDefinedFunction>> |
deleteUserDefinedFunction(String udfLink,
RequestOptions options)
Deletes a user defined function.
|
rx.Observable<StoredProcedureResponse> |
executeStoredProcedure(String storedProcedureLink,
Object[] procedureParams)
Executes a stored procedure by the stored procedure link.
|
rx.Observable<StoredProcedureResponse> |
executeStoredProcedure(String storedProcedureLink,
RequestOptions options,
Object[] procedureParams)
Executes a stored procedure by the stored procedure link.
|
ConnectionPolicy |
getConnectionPolicy()
Gets the connection policy
|
rx.Observable<DatabaseAccount> |
getDatabaseAccount()
Gets database account information.
|
URI |
getReadEndpoint()
Gets the current read endpoint chosen based on availability and preference.
|
URI |
getServiceEndpoint()
Gets the default service endpoint as passed in by the user during construction.
|
URI |
getWriteEndpoint()
Gets the current write endpoint chosen based on availability and preference.
|
rx.Observable<FeedResponse<Attachment>> |
queryAttachments(String documentLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for attachments.
|
rx.Observable<FeedResponse<Attachment>> |
queryAttachments(String documentLink,
String query,
FeedOptions options)
Query for attachments.
|
rx.Observable<FeedResponse<DocumentCollection>> |
queryCollections(String databaseLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for document collections in a database.
|
rx.Observable<FeedResponse<DocumentCollection>> |
queryCollections(String databaseLink,
String query,
FeedOptions options)
Query for document collections in a database.
|
rx.Observable<FeedResponse<Conflict>> |
queryConflicts(String collectionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for conflicts.
|
rx.Observable<FeedResponse<Conflict>> |
queryConflicts(String collectionLink,
String query,
FeedOptions options)
Query for conflicts.
|
rx.Observable<FeedResponse<Database>> |
queryDatabases(SqlQuerySpec querySpec,
FeedOptions options)
Query for databases.
|
rx.Observable<FeedResponse<Database>> |
queryDatabases(String query,
FeedOptions options)
Query for databases.
|
rx.Observable<FeedResponse<Document>> |
queryDocumentChangeFeed(String collectionLink,
ChangeFeedOptions changeFeedOptions)
Query for documents change feed in a document collection.
|
rx.Observable<FeedResponse<Document>> |
queryDocuments(String collectionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for documents in a document collection.
|
rx.Observable<FeedResponse<Document>> |
queryDocuments(String collectionLink,
String query,
FeedOptions options)
Query for documents in a document collection.
|
rx.Observable<FeedResponse<Offer>> |
queryOffers(SqlQuerySpec querySpec,
FeedOptions options)
Query for offers in a database.
|
rx.Observable<FeedResponse<Offer>> |
queryOffers(String query,
FeedOptions options)
Query for offers in a database.
|
rx.Observable<FeedResponse<Permission>> |
queryPermissions(String permissionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for permissions.
|
rx.Observable<FeedResponse<Permission>> |
queryPermissions(String permissionLink,
String query,
FeedOptions options)
Query for permissions.
|
rx.Observable<FeedResponse<StoredProcedure>> |
queryStoredProcedures(String collectionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for stored procedures in a document collection.
|
rx.Observable<FeedResponse<StoredProcedure>> |
queryStoredProcedures(String collectionLink,
String query,
FeedOptions options)
Query for stored procedures in a document collection.
|
rx.Observable<FeedResponse<Trigger>> |
queryTriggers(String collectionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for triggers.
|
rx.Observable<FeedResponse<Trigger>> |
queryTriggers(String collectionLink,
String query,
FeedOptions options)
Query for triggers.
|
rx.Observable<FeedResponse<UserDefinedFunction>> |
queryUserDefinedFunctions(String collectionLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for user defined functions.
|
rx.Observable<FeedResponse<UserDefinedFunction>> |
queryUserDefinedFunctions(String collectionLink,
String query,
FeedOptions options)
Query for user defined functions.
|
rx.Observable<FeedResponse<User>> |
queryUsers(String databaseLink,
SqlQuerySpec querySpec,
FeedOptions options)
Query for users.
|
rx.Observable<FeedResponse<User>> |
queryUsers(String databaseLink,
String query,
FeedOptions options)
Query for users.
|
rx.Observable<ResourceResponse<Attachment>> |
readAttachment(String attachmentLink,
RequestOptions options)
Reads an attachment.
|
rx.Observable<FeedResponse<Attachment>> |
readAttachments(String documentLink,
FeedOptions options)
Reads all attachments in a document.
|
rx.Observable<ResourceResponse<DocumentCollection>> |
readCollection(String collectionLink,
RequestOptions options)
Reads a document collection by the collection link.
|
rx.Observable<FeedResponse<DocumentCollection>> |
readCollections(String databaseLink,
FeedOptions options)
Reads all document collections in a database.
|
rx.Observable<ResourceResponse<Conflict>> |
readConflict(String conflictLink,
RequestOptions options)
Reads a conflict.
|
rx.Observable<FeedResponse<Conflict>> |
readConflicts(String collectionLink,
FeedOptions options)
Reads all conflicts in a document collection.
|
rx.Observable<ResourceResponse<Database>> |
readDatabase(String databaseLink,
RequestOptions options)
Reads a database.
|
rx.Observable<FeedResponse<Database>> |
readDatabases(FeedOptions options)
Reads all databases.
|
rx.Observable<ResourceResponse<Document>> |
readDocument(String documentLink,
RequestOptions options)
Reads a document by the document link.
|
rx.Observable<FeedResponse<Document>> |
readDocuments(String collectionLink,
FeedOptions options)
Reads all documents in a document collection.
|
rx.Observable<MediaResponse> |
readMedia(String mediaLink)
Reads a media by the media link.
|
rx.Observable<ResourceResponse<Offer>> |
readOffer(String offerLink)
Reads an offer.
|
rx.Observable<FeedResponse<Offer>> |
readOffers(FeedOptions options)
Reads offers.
|
rx.Observable<FeedResponse<PartitionKeyRange>> |
readPartitionKeyRanges(String collectionLink,
FeedOptions options)
Reads all partition key ranges in a document collection.
|
rx.Observable<ResourceResponse<Permission>> |
readPermission(String permissionLink,
RequestOptions options)
Reads a permission.
|
rx.Observable<FeedResponse<Permission>> |
readPermissions(String permissionLink,
FeedOptions options)
Reads all permissions.
|
rx.Observable<ResourceResponse<StoredProcedure>> |
readStoredProcedure(String storedProcedureLink,
RequestOptions options)
Read a stored procedure by the stored procedure link.
|
rx.Observable<FeedResponse<StoredProcedure>> |
readStoredProcedures(String collectionLink,
FeedOptions options)
Reads all stored procedures in a document collection link.
|
rx.Observable<ResourceResponse<Trigger>> |
readTrigger(String triggerLink,
RequestOptions options)
Reads a trigger by the trigger link.
|
rx.Observable<FeedResponse<Trigger>> |
readTriggers(String collectionLink,
FeedOptions options)
Reads all triggers in a document collection.
|
rx.Observable<ResourceResponse<User>> |
readUser(String userLink,
RequestOptions options)
Reads a user.
|
rx.Observable<ResourceResponse<UserDefinedFunction>> |
readUserDefinedFunction(String udfLink,
RequestOptions options)
Read a user defined function.
|
rx.Observable<FeedResponse<UserDefinedFunction>> |
readUserDefinedFunctions(String collectionLink,
FeedOptions options)
Reads all user defined functions in a document collection.
|
rx.Observable<FeedResponse<User>> |
readUsers(String databaseLink,
FeedOptions options)
Reads all users in a database.
|
rx.Observable<ResourceResponse<Attachment>> |
replaceAttachment(Attachment attachment,
RequestOptions options)
Replaces an attachment.
|
rx.Observable<ResourceResponse<DocumentCollection>> |
replaceCollection(DocumentCollection collection,
RequestOptions options)
Replaces a document collection.
|
rx.Observable<ResourceResponse<Document>> |
replaceDocument(Document document,
RequestOptions options)
Replaces a document with the passed in document.
|
rx.Observable<ResourceResponse<Document>> |
replaceDocument(String documentLink,
Object document,
RequestOptions options)
Replaces a document using a POJO object.
|
rx.Observable<ResourceResponse<Offer>> |
replaceOffer(Offer offer)
Replaces an offer.
|
rx.Observable<ResourceResponse<Permission>> |
replacePermission(Permission permission,
RequestOptions options)
Replaces a permission.
|
rx.Observable<ResourceResponse<StoredProcedure>> |
replaceStoredProcedure(StoredProcedure storedProcedure,
RequestOptions options)
Replaces a stored procedure.
|
rx.Observable<ResourceResponse<Trigger>> |
replaceTrigger(Trigger trigger,
RequestOptions options)
Replaces a trigger.
|
rx.Observable<ResourceResponse<User>> |
replaceUser(User user,
RequestOptions options)
Replaces a user.
|
rx.Observable<ResourceResponse<UserDefinedFunction>> |
replaceUserDefinedFunction(UserDefinedFunction udf,
RequestOptions options)
Replaces a user defined function.
|
rx.Observable<MediaResponse> |
updateMedia(String mediaLink,
InputStream mediaStream,
MediaOptions options)
Updates a media by the media link.
|
rx.Observable<ResourceResponse<Attachment>> |
upsertAttachment(String documentLink,
Attachment attachment,
RequestOptions options)
Upserts an attachment.
|
rx.Observable<ResourceResponse<Attachment>> |
upsertAttachment(String documentLink,
InputStream mediaStream,
MediaOptions options,
RequestOptions requestOptions)
Upserts an attachment to the media stream
After subscription the operation will be performed.
|
rx.Observable<ResourceResponse<Document>> |
upsertDocument(String collectionLink,
Object document,
RequestOptions options,
boolean disableAutomaticIdGeneration)
Upserts a document.
|
rx.Observable<ResourceResponse<Permission>> |
upsertPermission(String userLink,
Permission permission,
RequestOptions options)
Upserts a permission.
|
rx.Observable<ResourceResponse<StoredProcedure>> |
upsertStoredProcedure(String collectionLink,
StoredProcedure storedProcedure,
RequestOptions options)
Upserts a stored procedure.
|
rx.Observable<ResourceResponse<Trigger>> |
upsertTrigger(String collectionLink,
Trigger trigger,
RequestOptions options)
Upserts a trigger.
|
rx.Observable<ResourceResponse<User>> |
upsertUser(String databaseLink,
User user,
RequestOptions options)
Upserts a user.
|
rx.Observable<ResourceResponse<UserDefinedFunction>> |
upsertUserDefinedFunction(String collectionLink,
UserDefinedFunction udf,
RequestOptions options)
Upserts a user defined function.
|
URI getServiceEndpoint()
URI getWriteEndpoint()
URI getReadEndpoint()
ConnectionPolicy getConnectionPolicy()
rx.Observable<ResourceResponse<Database>> createDatabase(Database database, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created database.
In case of failure the Observable
will error.database
- the database.options
- the request options.Observable
containing the single resource response with the created database or an error.rx.Observable<ResourceResponse<Database>> deleteDatabase(String databaseLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the deleted database.
In case of failure the Observable
will error.databaseLink
- the database link.options
- the request options.Observable
containing the single resource response with the deleted database or an error.rx.Observable<ResourceResponse<Database>> readDatabase(String databaseLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read database.
In case of failure the Observable
will error.databaseLink
- the database link.options
- the request options.Observable
containing the single resource response with the read database or an error.rx.Observable<FeedResponse<Database>> readDatabases(FeedOptions options)
Observable
will contain one or several feed response of the read databases.
In case of failure the Observable
will error.options
- the feed options.Observable
containing one or several feed response pages of read databases or an error.rx.Observable<FeedResponse<Database>> queryDatabases(String query, FeedOptions options)
Observable
will contain one or several feed response of the read databases.
In case of failure the Observable
will error.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of read databases or an error.rx.Observable<FeedResponse<Database>> queryDatabases(SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response of the obtained databases.
In case of failure the Observable
will error.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained databases or an error.rx.Observable<ResourceResponse<DocumentCollection>> createCollection(String databaseLink, DocumentCollection collection, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created collection.
In case of failure the Observable
will error.databaseLink
- the database link.collection
- the collection.options
- the request options.Observable
containing the single resource response with the created collection or an error.rx.Observable<ResourceResponse<DocumentCollection>> replaceCollection(DocumentCollection collection, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced document collection.
In case of failure the Observable
will error.collection
- the document collection to use.options
- the request options.Observable
containing the single resource response with the replaced document collection or an error.rx.Observable<ResourceResponse<DocumentCollection>> deleteCollection(String collectionLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted database.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the request options.Observable
containing the single resource response for the deleted database or an error.rx.Observable<ResourceResponse<DocumentCollection>> readCollection(String collectionLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read collection.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the request options.Observable
containing the single resource response with the read collection or an error.rx.Observable<FeedResponse<DocumentCollection>> readCollections(String databaseLink, FeedOptions options)
Observable
will contain one or several feed response of the read collections.
In case of failure the Observable
will error.databaseLink
- the database link.options
- the fee options.rx.Observable<FeedResponse<DocumentCollection>> queryCollections(String databaseLink, String query, FeedOptions options)
Observable
will contain one or several feed response of the obtained collections.
In case of failure the Observable
will error.databaseLink
- the database link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained collections or an error.rx.Observable<FeedResponse<DocumentCollection>> queryCollections(String databaseLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response of the obtained collections.
In case of failure the Observable
will error.databaseLink
- the database link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained collections or an error.rx.Observable<ResourceResponse<Document>> createDocument(String collectionLink, Object document, RequestOptions options, boolean disableAutomaticIdGeneration)
Observable
upon successful completion will contain a single resource response with the created document.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.document
- the document represented as a POJO or Document object.options
- the request options.disableAutomaticIdGeneration
- the flag for disabling automatic id generation.Observable
containing the single resource response with the created document or an error.rx.Observable<ResourceResponse<Document>> upsertDocument(String collectionLink, Object document, RequestOptions options, boolean disableAutomaticIdGeneration)
Observable
upon successful completion will contain a single resource response with the upserted document.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.document
- the document represented as a POJO or Document object to upsert.options
- the request options.disableAutomaticIdGeneration
- the flag for disabling automatic id generation.Observable
containing the single resource response with the upserted document or an error.rx.Observable<ResourceResponse<Document>> replaceDocument(String documentLink, Object document, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced document.
In case of failure the Observable
will error.documentLink
- the document link.document
- the document represented as a POJO or Document object.options
- the request options.Observable
containing the single resource response with the replaced document or an error.rx.Observable<ResourceResponse<Document>> replaceDocument(Document document, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced document.
In case of failure the Observable
will error.document
- the document to replace (containing the document id).options
- the request options.Observable
containing the single resource response with the replaced document or an error.rx.Observable<ResourceResponse<Document>> deleteDocument(String documentLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted document.
In case of failure the Observable
will error.documentLink
- the document link.options
- the request options.Observable
containing the single resource response for the deleted document or an error.rx.Observable<ResourceResponse<Document>> readDocument(String documentLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read document.
In case of failure the Observable
will error.documentLink
- the document link.options
- the request options.Observable
containing the single resource response with the read document or an error.rx.Observable<FeedResponse<Document>> readDocuments(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response of the read documents.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the feed options.Observable
containing one or several feed response pages of the read documents or an error.rx.Observable<FeedResponse<Document>> queryDocuments(String collectionLink, String query, FeedOptions options)
Observable
will contain one or several feed response of the obtained documents.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained document or an error.rx.Observable<FeedResponse<Document>> queryDocuments(String collectionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response of the obtained documents.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained documents or an error.rx.Observable<FeedResponse<Document>> queryDocumentChangeFeed(String collectionLink, ChangeFeedOptions changeFeedOptions)
Observable
will contain one or several feed response pages of the obtained documents.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.changeFeedOptions
- the change feed options.Observable
containing one or several feed response pages of the obtained documents or an error.rx.Observable<FeedResponse<PartitionKeyRange>> readPartitionKeyRanges(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained partition key ranges.
In case of failure the Observable
will error.collectionLink
- the link to the parent document collection.options
- the feed options.Observable
containing one or several feed response pages of the obtained partition key ranges or an error.rx.Observable<ResourceResponse<StoredProcedure>> createStoredProcedure(String collectionLink, StoredProcedure storedProcedure, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created stored procedure.
In case of failure the Observable
will error.collectionLink
- the collection link.storedProcedure
- the stored procedure to create.options
- the request options.Observable
containing the single resource response with the created stored procedure or an error.rx.Observable<ResourceResponse<StoredProcedure>> upsertStoredProcedure(String collectionLink, StoredProcedure storedProcedure, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted stored procedure.
In case of failure the Observable
will error.collectionLink
- the collection link.storedProcedure
- the stored procedure to upsert.options
- the request options.Observable
containing the single resource response with the upserted stored procedure or an error.rx.Observable<ResourceResponse<StoredProcedure>> replaceStoredProcedure(StoredProcedure storedProcedure, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced stored procedure.
In case of failure the Observable
will error.storedProcedure
- the stored procedure to use.options
- the request options.Observable
containing the single resource response with the replaced stored procedure or an error.rx.Observable<ResourceResponse<StoredProcedure>> deleteStoredProcedure(String storedProcedureLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted stored procedure.
In case of failure the Observable
will error.storedProcedureLink
- the stored procedure link.options
- the request options.Observable
containing the single resource response for the deleted stored procedure or an error.rx.Observable<ResourceResponse<StoredProcedure>> readStoredProcedure(String storedProcedureLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read stored procedure.
In case of failure the Observable
will error.storedProcedureLink
- the stored procedure link.options
- the request options.Observable
containing the single resource response with the read stored procedure or an error.rx.Observable<FeedResponse<StoredProcedure>> readStoredProcedures(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read stored procedures.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the feed options.Observable
containing one or several feed response pages of the read stored procedures or an error.rx.Observable<FeedResponse<StoredProcedure>> queryStoredProcedures(String collectionLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained stored procedures.
In case of failure the Observable
will error.collectionLink
- the collection link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained stored procedures or an error.rx.Observable<FeedResponse<StoredProcedure>> queryStoredProcedures(String collectionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained stored procedures.
In case of failure the Observable
will error.collectionLink
- the collection link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained stored procedures or an error.rx.Observable<StoredProcedureResponse> executeStoredProcedure(String storedProcedureLink, Object[] procedureParams)
Observable
upon successful completion will contain a single resource response with the stored procedure response.
In case of failure the Observable
will error.storedProcedureLink
- the stored procedure link.procedureParams
- the array of procedure parameter values.Observable
containing the single resource response with the stored procedure response or an error.rx.Observable<StoredProcedureResponse> executeStoredProcedure(String storedProcedureLink, RequestOptions options, Object[] procedureParams)
Observable
upon successful completion will contain a single resource response with the stored procedure response.
In case of failure the Observable
will error.storedProcedureLink
- the stored procedure link.options
- the request options.procedureParams
- the array of procedure parameter values.Observable
containing the single resource response with the stored procedure response or an error.rx.Observable<ResourceResponse<Trigger>> createTrigger(String collectionLink, Trigger trigger, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created trigger.
In case of failure the Observable
will error.collectionLink
- the collection link.trigger
- the trigger.options
- the request options.Observable
containing the single resource response with the created trigger or an error.rx.Observable<ResourceResponse<Trigger>> upsertTrigger(String collectionLink, Trigger trigger, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted trigger.
In case of failure the Observable
will error.collectionLink
- the collection link.trigger
- the trigger to upsert.options
- the request options.Observable
containing the single resource response with the upserted trigger or an error.rx.Observable<ResourceResponse<Trigger>> replaceTrigger(Trigger trigger, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced trigger.
In case of failure the Observable
will error.trigger
- the trigger to use.options
- the request options.Observable
containing the single resource response with the replaced trigger or an error.rx.Observable<ResourceResponse<Trigger>> deleteTrigger(String triggerLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted trigger.
In case of failure the Observable
will error.triggerLink
- the trigger link.options
- the request options.Observable
containing the single resource response for the deleted trigger or an error.rx.Observable<ResourceResponse<Trigger>> readTrigger(String triggerLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the read trigger.
In case of failure the Observable
will error.triggerLink
- the trigger link.options
- the request options.Observable
containing the single resource response for the read trigger or an error.rx.Observable<FeedResponse<Trigger>> readTriggers(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read triggers.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the feed options.Observable
containing one or several feed response pages of the read triggers or an error.rx.Observable<FeedResponse<Trigger>> queryTriggers(String collectionLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained triggers.
In case of failure the Observable
will error.collectionLink
- the collection link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained triggers or an error.rx.Observable<FeedResponse<Trigger>> queryTriggers(String collectionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained triggers.
In case of failure the Observable
will error.collectionLink
- the collection link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained triggers or an error.rx.Observable<ResourceResponse<UserDefinedFunction>> createUserDefinedFunction(String collectionLink, UserDefinedFunction udf, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created user defined function.
In case of failure the Observable
will error.collectionLink
- the collection link.udf
- the user defined function.options
- the request options.Observable
containing the single resource response with the created user defined function or an error.rx.Observable<ResourceResponse<UserDefinedFunction>> upsertUserDefinedFunction(String collectionLink, UserDefinedFunction udf, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted user defined function.
In case of failure the Observable
will error.collectionLink
- the collection link.udf
- the user defined function to upsert.options
- the request options.Observable
containing the single resource response with the upserted user defined function or an error.rx.Observable<ResourceResponse<UserDefinedFunction>> replaceUserDefinedFunction(UserDefinedFunction udf, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced user defined function.
In case of failure the Observable
will error.udf
- the user defined function.options
- the request options.Observable
containing the single resource response with the replaced user defined function or an error.rx.Observable<ResourceResponse<UserDefinedFunction>> deleteUserDefinedFunction(String udfLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted user defined function.
In case of failure the Observable
will error.udfLink
- the user defined function link.options
- the request options.Observable
containing the single resource response for the deleted user defined function or an error.rx.Observable<ResourceResponse<UserDefinedFunction>> readUserDefinedFunction(String udfLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the read user defined function.
In case of failure the Observable
will error.udfLink
- the user defined function link.options
- the request options.Observable
containing the single resource response for the read user defined function or an error.rx.Observable<FeedResponse<UserDefinedFunction>> readUserDefinedFunctions(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read user defined functions.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the feed options.Observable
containing one or several feed response pages of the read user defined functions or an error.rx.Observable<FeedResponse<UserDefinedFunction>> queryUserDefinedFunctions(String collectionLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained user defined functions.
In case of failure the Observable
will error.collectionLink
- the collection link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained user defined functions or an error.rx.Observable<FeedResponse<UserDefinedFunction>> queryUserDefinedFunctions(String collectionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained user defined functions.
In case of failure the Observable
will error.collectionLink
- the collection link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained user defined functions or an error.rx.Observable<ResourceResponse<Attachment>> createAttachment(String documentLink, Attachment attachment, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created attachment.
In case of failure the Observable
will error.documentLink
- the document link.attachment
- the attachment to create.options
- the request options.Observable
containing the single resource response with the created attachment or an error.rx.Observable<ResourceResponse<Attachment>> upsertAttachment(String documentLink, Attachment attachment, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted attachment.
In case of failure the Observable
will error.documentLink
- the document link.attachment
- the attachment to upsert.options
- the request options.Observable
containing the single resource response with the upserted attachment or an error.rx.Observable<ResourceResponse<Attachment>> replaceAttachment(Attachment attachment, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced attachment.
In case of failure the Observable
will error.attachment
- the attachment to use.options
- the request options.Observable
containing the single resource response with the replaced attachment or an error.rx.Observable<ResourceResponse<Attachment>> deleteAttachment(String attachmentLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted attachment.
In case of failure the Observable
will error.attachmentLink
- the attachment link.options
- the request options.Observable
containing the single resource response for the deleted attachment or an error.rx.Observable<ResourceResponse<Attachment>> readAttachment(String attachmentLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read attachment.
In case of failure the Observable
will error.attachmentLink
- the attachment link.options
- the request options.Observable
containing the single resource response with the read attachment or an error.rx.Observable<FeedResponse<Attachment>> readAttachments(String documentLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read attachments.
In case of failure the Observable
will error.documentLink
- the document link.options
- the feed options.Observable
containing one or several feed response pages of the read attachments or an error.rx.Observable<MediaResponse> readMedia(String mediaLink)
mediaLink
- the media link.rx.Observable<MediaResponse> updateMedia(String mediaLink, InputStream mediaStream, MediaOptions options)
mediaLink
- the media link.mediaStream
- the media stream to upload.options
- the media options.rx.Observable<FeedResponse<Attachment>> queryAttachments(String documentLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained attachments.
In case of failure the Observable
will error.documentLink
- the document link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained attachments or an error.rx.Observable<FeedResponse<Attachment>> queryAttachments(String documentLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained attachments.
In case of failure the Observable
will error.documentLink
- the document link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained attachments or an error.rx.Observable<ResourceResponse<Attachment>> createAttachment(String documentLink, InputStream mediaStream, MediaOptions options, RequestOptions requestOptions)
Observable
upon successful completion will contain a single resource response with the created attachment.
In case of failure the Observable
will error.documentLink
- the document link.mediaStream
- the media stream for creating the attachment.options
- the media options.requestOptions
- the request optionsObservable
containing the single resource response with the created attachment or an error.rx.Observable<ResourceResponse<Attachment>> upsertAttachment(String documentLink, InputStream mediaStream, MediaOptions options, RequestOptions requestOptions)
Observable
upon successful completion will contain a single resource response with the upserted attachment.
In case of failure the Observable
will error.documentLink
- the document link.mediaStream
- the media stream for upserting the attachment.options
- the media options.requestOptions
- the request optionsObservable
containing the single resource response with the upserted attachment or an error.rx.Observable<ResourceResponse<Conflict>> readConflict(String conflictLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read conflict.
In case of failure the Observable
will error.conflictLink
- the conflict link.options
- the request options.Observable
containing the single resource response with the read conflict or an error.rx.Observable<FeedResponse<Conflict>> readConflicts(String collectionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read conflicts.
In case of failure the Observable
will error.collectionLink
- the collection link.options
- the feed options.Observable
containing one or several feed response pages of the read conflicts or an error.rx.Observable<FeedResponse<Conflict>> queryConflicts(String collectionLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained conflicts.
In case of failure the Observable
will error.collectionLink
- the collection link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained conflicts or an error.rx.Observable<FeedResponse<Conflict>> queryConflicts(String collectionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained conflicts.
In case of failure the Observable
will error.collectionLink
- the collection link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained conflicts or an error.rx.Observable<ResourceResponse<Conflict>> deleteConflict(String conflictLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted conflict.
In case of failure the Observable
will error.conflictLink
- the conflict link.options
- the request options.Observable
containing the single resource response for the deleted conflict or an error.rx.Observable<ResourceResponse<User>> createUser(String databaseLink, User user, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created user.
In case of failure the Observable
will error.databaseLink
- the database link.user
- the user to create.options
- the request options.Observable
containing the single resource response with the created user or an error.rx.Observable<ResourceResponse<User>> upsertUser(String databaseLink, User user, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted user.
In case of failure the Observable
will error.databaseLink
- the database link.user
- the user to upsert.options
- the request options.Observable
containing the single resource response with the upserted user or an error.rx.Observable<ResourceResponse<User>> replaceUser(User user, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced user.
In case of failure the Observable
will error.user
- the user to use.options
- the request options.Observable
containing the single resource response with the replaced user or an error.rx.Observable<ResourceResponse<User>> deleteUser(String userLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted user.
In case of failure the Observable
will error.userLink
- the user link.options
- the request options.Observable
containing the single resource response for the deleted user or an error.rx.Observable<ResourceResponse<User>> readUser(String userLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read user.
In case of failure the Observable
will error.userLink
- the user link.options
- the request options.Observable
containing the single resource response with the read user or an error.rx.Observable<FeedResponse<User>> readUsers(String databaseLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read users.
In case of failure the Observable
will error.databaseLink
- the database link.options
- the feed options.Observable
containing one or several feed response pages of the read users or an error.rx.Observable<FeedResponse<User>> queryUsers(String databaseLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained users.
In case of failure the Observable
will error.databaseLink
- the database link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained users or an error.rx.Observable<FeedResponse<User>> queryUsers(String databaseLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained users.
In case of failure the Observable
will error.databaseLink
- the database link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained users or an error.rx.Observable<ResourceResponse<Permission>> createPermission(String userLink, Permission permission, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the created permission.
In case of failure the Observable
will error.userLink
- the user link.permission
- the permission to create.options
- the request options.Observable
containing the single resource response with the created permission or an error.rx.Observable<ResourceResponse<Permission>> upsertPermission(String userLink, Permission permission, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the upserted permission.
In case of failure the Observable
will error.userLink
- the user link.permission
- the permission to upsert.options
- the request options.Observable
containing the single resource response with the upserted permission or an error.rx.Observable<ResourceResponse<Permission>> replacePermission(Permission permission, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the replaced permission.
In case of failure the Observable
will error.permission
- the permission to use.options
- the request options.Observable
containing the single resource response with the replaced permission or an error.rx.Observable<ResourceResponse<Permission>> deletePermission(String permissionLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response for the deleted permission.
In case of failure the Observable
will error.permissionLink
- the permission link.options
- the request options.Observable
containing the single resource response for the deleted permission or an error.rx.Observable<ResourceResponse<Permission>> readPermission(String permissionLink, RequestOptions options)
Observable
upon successful completion will contain a single resource response with the read permission.
In case of failure the Observable
will error.permissionLink
- the permission link.options
- the request options.Observable
containing the single resource response with the read permission or an error.rx.Observable<FeedResponse<Permission>> readPermissions(String permissionLink, FeedOptions options)
Observable
will contain one or several feed response pages of the read permissions.
In case of failure the Observable
will error.permissionLink
- the permission link.options
- the feed options.Observable
containing one or several feed response pages of the read permissions or an error.rx.Observable<FeedResponse<Permission>> queryPermissions(String permissionLink, String query, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained permissions.
In case of failure the Observable
will error.permissionLink
- the permission link.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained permissions or an error.rx.Observable<FeedResponse<Permission>> queryPermissions(String permissionLink, SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of the obtained permissions.
In case of failure the Observable
will error.permissionLink
- the permission link.querySpec
- the SQL query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained permissions or an error.rx.Observable<ResourceResponse<Offer>> replaceOffer(Offer offer)
Observable
upon successful completion will contain a single resource response with the replaced offer.
In case of failure the Observable
will error.offer
- the offer to use.Observable
containing the single resource response with the replaced offer or an error.rx.Observable<ResourceResponse<Offer>> readOffer(String offerLink)
Observable
upon successful completion will contain a single resource response with the read offer.
In case of failure the Observable
will error.offerLink
- the offer link.Observable
containing the single resource response with the read offer or an error.rx.Observable<FeedResponse<Offer>> readOffers(FeedOptions options)
Observable
will contain one or several feed response pages of the read offers.
In case of failure the Observable
will error.options
- the feed options.Observable
containing one or several feed response pages of the read offers or an error.rx.Observable<FeedResponse<Offer>> queryOffers(String query, FeedOptions options)
Observable
will contain one or several feed response pages of obtained obtained offers.
In case of failure the Observable
will error.query
- the query.options
- the feed options.Observable
containing one or several feed response pages of the obtained offers or an error.rx.Observable<FeedResponse<Offer>> queryOffers(SqlQuerySpec querySpec, FeedOptions options)
Observable
will contain one or several feed response pages of obtained obtained offers.
In case of failure the Observable
will error.querySpec
- the query specification.options
- the feed options.Observable
containing one or several feed response pages of the obtained offers or an error.rx.Observable<DatabaseAccount> getDatabaseAccount()
Observable
upon successful completion will contain a single resource response with the database account.
In case of failure the Observable
will error.Observable
containing the single resource response with the database account or an error.void close()
AsyncDocumentClient
instance and cleans up the resources.Copyright © 2019. All rights reserved.