Package io.inversion.cosmosdb
Class CosmosDb
java.lang.Object
io.inversion.Rule<T>
io.inversion.Db<CosmosDb>
io.inversion.cosmosdb.CosmosDb
- All Implemented Interfaces:
Comparable<CosmosDb>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.inversion.Rule
io.inversion.Rule.RuleMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected com.microsoft.azure.documentdb.DocumentClientstatic final Stringprotected Stringprotected StringFields inherited from class io.inversion.Db
bootstrap, collections, dryRun, excludeColumns, includeColumns, includeTables, log, reservedParams, typeFields inherited from class io.inversion.Rule
ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, name, order, params -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.microsoft.azure.documentdb.DocumentClientbuildDocumentClient(String uri, String key, com.microsoft.azure.documentdb.ConnectionPolicy connectionPolicy) protected voidDeletes a single specific resource.voidio.inversion.ResultsFinds the resource keys on the other side of the relationshipprotected StringgetCollectionUri(io.inversion.Collection table) getDb()com.microsoft.azure.documentdb.DocumentClientgetKey()getUri()booleanwithAllowCrossPartitionQueries(boolean allowCrossPartitionQueries) withDocumentClient(com.microsoft.azure.documentdb.DocumentClient documentClient) Methods inherited from class io.inversion.Db
beautifyCollectionName, beautifyName, buildCollections, buildRelationships, castDbOutput, castJsonInput, castJsonInput, configApi, configDb, delete, doPatch, doShutdown, doShutdown, doStartup, excludeTable, filterOutJsonProperty, getCollection, getCollectionByTableName, getCollections, getProperty, getType, isBootstrap, isDryRun, isRunning, isType, makeRelationshipName, mapToColumnNames, mapToColumnNames, mapToJsonNames, patch, removeCollection, select, shutdown, shutdown, startup, upsert, withBootstrap, withCollection, withCollections, withDryRun, withExcludeColumns, withIncludeColumns, withIncludeTable, withIncludeTables, withTypeMethods inherited from class io.inversion.Rule
afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
-
Field Details
-
INDEX_TYPE_PARTITION_KEY
- See Also:
-
uri
-
db
-
key
-
documentClient
protected transient com.microsoft.azure.documentdb.DocumentClient documentClient
-
-
Constructor Details
-
CosmosDb
public CosmosDb() -
CosmosDb
-
-
Method Details
-
buildDocumentClient
-
doSelect
public io.inversion.Results doSelect(io.inversion.Collection collection, List<io.inversion.rql.Term> columnMappedTerms) throws io.inversion.ApiException Finds the resource keys on the other side of the relationship- Overrides:
doSelectin classio.inversion.Db<CosmosDb>- Parameters:
collection- the collection to querycolumnMappedTerms- the query terms- Returns:
- Map key=sourceResourceKey, value=relatedResourceKey
- Throws:
io.inversion.ApiException- if selection fails for any reason
-
doUpsert
public List<String> doUpsert(io.inversion.Collection table, List<Map<String, Object>> rows) throws io.inversion.ApiException- Overrides:
doUpsertin classio.inversion.Db<CosmosDb>- Throws:
io.inversion.ApiException
-
upsertRow
public String upsertRow(io.inversion.Collection collection, Map<String, Object> row) throws io.inversion.ApiException- Throws:
io.inversion.ApiException
-
doDelete
public void doDelete(io.inversion.Collection table, List<Map<String, Object>> indexValues) throws io.inversion.ApiException- Overrides:
doDeletein classio.inversion.Db<CosmosDb>- Throws:
io.inversion.ApiException
-
deleteRow
protected void deleteRow(io.inversion.Collection collection, Map<String, Object> indexValues) throws io.inversion.ApiExceptionDeletes a single specific resource.Rest url format for Cosmos deletions - https://{databaseaccount}.documents.azure.com/dbs/{db}/colls/{coll}/docs/{doc}
- Parameters:
collection- the collection to deleteindexValues- identifiers for the documents to delete- Throws:
io.inversion.ApiException- See Also:
-
getCollectionUri
-
getUri
-
withUri
-
getDb
-
withDb
-
getKey
-
withKey
-
isAllowCrossPartitionQueries
public boolean isAllowCrossPartitionQueries() -
withAllowCrossPartitionQueries
-
withDocumentClient
-
getDocumentClient
public com.microsoft.azure.documentdb.DocumentClient getDocumentClient()
-