Package com.azure.cosmos
Class CosmosScripts
java.lang.Object
com.azure.cosmos.CosmosScripts
The type Cosmos sync scripts.
-
Method Summary
Modifier and TypeMethodDescriptioncreateStoredProcedure
(CosmosStoredProcedureProperties properties) Create stored procedurecreateStoredProcedure
(CosmosStoredProcedureProperties properties, CosmosStoredProcedureRequestOptions options) Create stored procedure cosmoscreateTrigger
(CosmosTriggerProperties properties) Create triggerCreate user defined functionGets stored procedure.getTrigger
(String id) Gets trigger.Gets user defined function.queryStoredProcedures
(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query stored proceduresCosmosPagedIterable
.queryStoredProcedures
(String query, CosmosQueryRequestOptions options) Query stored proceduresCosmosPagedIterable
.queryTriggers
(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query triggersCosmosPagedIterable
.queryTriggers
(String query, CosmosQueryRequestOptions options) Query triggersCosmosPagedIterable
.queryUserDefinedFunctions
(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query user defined functionsCosmosPagedIterable
.queryUserDefinedFunctions
(String query, CosmosQueryRequestOptions options) Query user defined functionsCosmosPagedIterable
.Read all stored proceduresCosmosPagedIterable
.Read all triggersCosmosPagedIterable
.Read all user defined functionsCosmosPagedIterable
.
-
Method Details
-
createStoredProcedure
public CosmosStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties) Create stored procedure- Parameters:
properties
- the properties- Returns:
- the cosmos stored procedure response
-
createStoredProcedure
public CosmosStoredProcedureResponse createStoredProcedure(CosmosStoredProcedureProperties properties, CosmosStoredProcedureRequestOptions options) Create stored procedure cosmos- Parameters:
properties
- the propertiesoptions
- the options- Returns:
- the cosmos stored procedure response
-
readAllStoredProcedures
Read all stored proceduresCosmosPagedIterable
.- Returns:
- the
CosmosPagedIterable
-
queryStoredProcedures
public CosmosPagedIterable<CosmosStoredProcedureProperties> queryStoredProcedures(String query, CosmosQueryRequestOptions options) Query stored proceduresCosmosPagedIterable
.- Parameters:
query
- the queryoptions
- the options- Returns:
- the
CosmosPagedIterable
-
queryStoredProcedures
public CosmosPagedIterable<CosmosStoredProcedureProperties> queryStoredProcedures(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query stored proceduresCosmosPagedIterable
.- Parameters:
querySpec
- the query specoptions
- the options- Returns:
- the
CosmosPagedIterable
-
getStoredProcedure
Gets stored procedure.- Parameters:
id
- the id- Returns:
- the stored procedure
-
createUserDefinedFunction
public CosmosUserDefinedFunctionResponse createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties) Create user defined function- Parameters:
properties
- the properties- Returns:
- the cosmos user defined function response
-
readAllUserDefinedFunctions
Read all user defined functionsCosmosPagedIterable
.- Returns:
- the
CosmosPagedIterable
-
queryUserDefinedFunctions
public CosmosPagedIterable<CosmosUserDefinedFunctionProperties> queryUserDefinedFunctions(String query, CosmosQueryRequestOptions options) Query user defined functionsCosmosPagedIterable
.- Parameters:
query
- the queryoptions
- the options- Returns:
- the
CosmosPagedIterable
-
queryUserDefinedFunctions
public CosmosPagedIterable<CosmosUserDefinedFunctionProperties> queryUserDefinedFunctions(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query user defined functionsCosmosPagedIterable
.- Parameters:
querySpec
- the query specoptions
- the options- Returns:
- the
CosmosPagedIterable
-
getUserDefinedFunction
Gets user defined function.- Parameters:
id
- the id- Returns:
- the user defined function
-
createTrigger
Create trigger- Parameters:
properties
- the properties- Returns:
- the cosmos trigger response
-
readAllTriggers
Read all triggersCosmosPagedIterable
.- Returns:
- the
CosmosPagedIterable
-
queryTriggers
public CosmosPagedIterable<CosmosTriggerProperties> queryTriggers(String query, CosmosQueryRequestOptions options) Query triggersCosmosPagedIterable
.- Parameters:
query
- the queryoptions
- the options- Returns:
- the
CosmosPagedIterable
-
queryTriggers
public CosmosPagedIterable<CosmosTriggerProperties> queryTriggers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options) Query triggersCosmosPagedIterable
.- Parameters:
querySpec
- the query specoptions
- the options- Returns:
- the
CosmosPagedIterable
-
getTrigger
Gets trigger.- Parameters:
id
- the id- Returns:
- the trigger
-