Package com.azure.data.cosmos
Class CosmosScripts
- java.lang.Object
-
- com.azure.data.cosmos.CosmosScripts
-
public class CosmosScripts extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<CosmosStoredProcedureResponse>
createStoredProcedure(CosmosStoredProcedureProperties properties)
Creates a cosmos stored procedure.Mono<CosmosStoredProcedureResponse>
createStoredProcedure(CosmosStoredProcedureProperties properties, CosmosStoredProcedureRequestOptions options)
Creates a cosmos stored procedure.Mono<CosmosTriggerResponse>
createTrigger(CosmosTriggerProperties properties)
Creates a Cosmos trigger.Mono<CosmosUserDefinedFunctionResponse>
createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties)
Creates a cosmos user defined function.CosmosStoredProcedure
getStoredProcedure(String id)
Gets a CosmosStoredProcedure object without making a service callCosmosTrigger
getTrigger(String id)
Gets a CosmosTrigger object without making a service callCosmosUserDefinedFunction
getUserDefinedFunction(String id)
Gets a CosmosUserDefinedFunction object without making a service callFlux<FeedResponse<CosmosStoredProcedureProperties>>
queryStoredProcedures(SqlQuerySpec querySpec, FeedOptions options)
Query for stored procedures in a container.Flux<FeedResponse<CosmosStoredProcedureProperties>>
queryStoredProcedures(String query, FeedOptions options)
Query for stored procedures in a container.Flux<FeedResponse<CosmosTriggerProperties>>
queryTriggers(SqlQuerySpec querySpec, FeedOptions options)
Query for triggers in the container After subscription the operation will be performed.Flux<FeedResponse<CosmosTriggerProperties>>
queryTriggers(String query, FeedOptions options)
Query for triggers in the container After subscription the operation will be performed.Flux<FeedResponse<CosmosUserDefinedFunctionProperties>>
queryUserDefinedFunctions(SqlQuerySpec querySpec, FeedOptions options)
Query for user defined functions in the container.Flux<FeedResponse<CosmosUserDefinedFunctionProperties>>
queryUserDefinedFunctions(String query, FeedOptions options)
Query for user defined functions in the container.Flux<FeedResponse<CosmosStoredProcedureProperties>>
readAllStoredProcedures(FeedOptions options)
Reads all cosmos stored procedures in a container.Flux<FeedResponse<CosmosTriggerProperties>>
readAllTriggers(FeedOptions options)
Reads all triggers in a container After subscription the operation will be performed.Flux<FeedResponse<CosmosUserDefinedFunctionProperties>>
readAllUserDefinedFunctions(FeedOptions options)
Reads all cosmos user defined functions in the container After subscription the operation will be performed.
-
-
-
Method Detail
-
createStoredProcedure
public Mono<CosmosStoredProcedureResponse> createStoredProcedure(CosmosStoredProcedureProperties properties)
Creates a cosmos stored procedure. After subscription the operation will be performed. TheMono
upon successful completion will contain a single cosmos stored procedure response with the created cosmos stored procedure. In case of failure theMono
will error.- Parameters:
properties
- the cosmos stored procedure properties.- Returns:
- an
Mono
containing the single cosmos stored procedure resource response or an error.
-
createStoredProcedure
public Mono<CosmosStoredProcedureResponse> createStoredProcedure(CosmosStoredProcedureProperties properties, CosmosStoredProcedureRequestOptions options)
Creates a cosmos stored procedure. After subscription the operation will be performed. TheMono
upon successful completion will contain a single cosmos stored procedure response with the created cosmos stored procedure. In case of failure theMono
will error.- Parameters:
properties
- the cosmos stored procedure properties.options
- the stored procedure request options.- Returns:
- an
Mono
containing the single cosmos stored procedure resource response or an error.
-
readAllStoredProcedures
public Flux<FeedResponse<CosmosStoredProcedureProperties>> readAllStoredProcedures(FeedOptions options)
Reads all cosmos stored procedures in a container. After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the read cosmos stored procedure properties. In case of failure theFlux
will error.- Parameters:
options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the read cosmos stored procedures properties or an error.
-
queryStoredProcedures
public Flux<FeedResponse<CosmosStoredProcedureProperties>> queryStoredProcedures(String query, FeedOptions options)
Query for stored procedures in a container. After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained stored procedures. In case of failure theFlux
will error.- Parameters:
query
- the the query.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained stored procedures or an error.
-
queryStoredProcedures
public Flux<FeedResponse<CosmosStoredProcedureProperties>> queryStoredProcedures(SqlQuerySpec querySpec, FeedOptions options)
Query for stored procedures in a container. After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained stored procedures. In case of failure theFlux
will error.- Parameters:
querySpec
- the SQL query specification.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained stored procedures or an error.
-
getStoredProcedure
public CosmosStoredProcedure getStoredProcedure(String id)
Gets a CosmosStoredProcedure object without making a service call- Parameters:
id
- id of the stored procedure- Returns:
- a cosmos stored procedure
-
createUserDefinedFunction
public Mono<CosmosUserDefinedFunctionResponse> createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties)
Creates a cosmos user defined function. After subscription the operation will be performed. TheMono
upon successful completion will contain a single cosmos user defined function response. In case of failure theMono
will error.- Parameters:
properties
- the cosmos user defined function properties- Returns:
- an
Mono
containing the single resource response with the created user defined function or an error.
-
readAllUserDefinedFunctions
public Flux<FeedResponse<CosmosUserDefinedFunctionProperties>> readAllUserDefinedFunctions(FeedOptions options)
Reads all cosmos user defined functions in the container After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the read user defined functions. In case of failure theFlux
will error.- Parameters:
options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the read user defined functions or an error.
-
queryUserDefinedFunctions
public Flux<FeedResponse<CosmosUserDefinedFunctionProperties>> queryUserDefinedFunctions(String query, FeedOptions options)
Query for user defined functions in the container. After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained user defined functions. In case of failure theFlux
will error.- Parameters:
query
- the query.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained user defined functions or an error.
-
queryUserDefinedFunctions
public Flux<FeedResponse<CosmosUserDefinedFunctionProperties>> queryUserDefinedFunctions(SqlQuerySpec querySpec, FeedOptions options)
Query for user defined functions in the container. After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained user defined functions. In case of failure theFlux
will error.- Parameters:
querySpec
- the SQL query specification.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained user defined functions or an error.
-
getUserDefinedFunction
public CosmosUserDefinedFunction getUserDefinedFunction(String id)
Gets a CosmosUserDefinedFunction object without making a service call- Parameters:
id
- id of the user defined function- Returns:
- a cosmos user defined function
-
createTrigger
public Mono<CosmosTriggerResponse> createTrigger(CosmosTriggerProperties properties)
Creates a Cosmos trigger. After subscription the operation will be performed. TheMono
upon successful completion will contain a cosmos trigger response In case of failure theMono
will error.- Parameters:
properties
- the cosmos trigger properties- Returns:
- an
Mono
containing the single resource response with the created trigger or an error.
-
readAllTriggers
public Flux<FeedResponse<CosmosTriggerProperties>> readAllTriggers(FeedOptions options)
Reads all triggers in a container After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the read cosmos trigger properties. In case of failure theFlux
will error.- Parameters:
options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the read cosmos rigger properties or an error.
-
queryTriggers
public Flux<FeedResponse<CosmosTriggerProperties>> queryTriggers(String query, FeedOptions options)
Query for triggers in the container After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained triggers. In case of failure theFlux
will error.- Parameters:
query
- the query.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained triggers or an error.
-
queryTriggers
public Flux<FeedResponse<CosmosTriggerProperties>> queryTriggers(SqlQuerySpec querySpec, FeedOptions options)
Query for triggers in the container After subscription the operation will be performed. TheFlux
will contain one or several feed response pages of the obtained triggers. In case of failure theFlux
will error.- Parameters:
querySpec
- the SQL query specification.options
- the feed options.- Returns:
- an
Flux
containing one or several feed response pages of the obtained triggers or an error.
-
getTrigger
public CosmosTrigger getTrigger(String id)
Gets a CosmosTrigger object without making a service call- Parameters:
id
- id of the cosmos trigger- Returns:
- a cosmos trigger
-
-