共用方式為


CosmosAsyncScripts Class

  • java.lang.Object
    • com.azure.cosmos.CosmosAsyncScripts

public class CosmosAsyncScripts

The type Cosmos async scripts. This contains async methods to operate on cosmos scripts like UDFs, StoredProcedures and Triggers

Method Summary

Modifier and Type Method and 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.

CosmosAsyncStoredProcedure getStoredProcedure(String id)

Gets a CosmosAsyncStoredProcedure object without making a service call

CosmosAsyncTrigger getTrigger(String id)

Gets a CosmosAsyncTrigger object without making a service call

CosmosAsyncUserDefinedFunction getUserDefinedFunction(String id)

Gets a CosmosAsyncUserDefinedFunction object without making a service call

CosmosPagedFlux<CosmosStoredProcedureProperties> queryStoredProcedures(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for stored procedures in a container.

CosmosPagedFlux<CosmosStoredProcedureProperties> queryStoredProcedures(String query, CosmosQueryRequestOptions options)

Query for stored procedures in a container.

CosmosPagedFlux<CosmosTriggerProperties> queryTriggers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for triggers in the container

CosmosPagedFlux<CosmosTriggerProperties> queryTriggers(String query, CosmosQueryRequestOptions options)

Query for triggers in the container

CosmosPagedFlux<CosmosUserDefinedFunctionProperties> queryUserDefinedFunctions(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for user defined functions in the container.

CosmosPagedFlux<CosmosUserDefinedFunctionProperties> queryUserDefinedFunctions(String query, CosmosQueryRequestOptions options)

Query for user defined functions in the container.

CosmosPagedFlux<CosmosStoredProcedureProperties> readAllStoredProcedures()

Reads all cosmos stored procedures in a container.

CosmosPagedFlux<CosmosTriggerProperties> readAllTriggers()

Reads all triggers in a container

CosmosPagedFlux<CosmosUserDefinedFunctionProperties> readAllUserDefinedFunctions()

Reads all cosmos user defined functions in the container

Methods inherited from java.lang.Object

Method Details

createStoredProcedure

public Mono createStoredProcedure(CosmosStoredProcedureProperties properties)

Creates a cosmos stored procedure.

After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos stored procedure response with the created cosmos stored procedure. In case of failure the Mono 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 createStoredProcedure(CosmosStoredProcedureProperties properties, CosmosStoredProcedureRequestOptions options)

Creates a cosmos stored procedure.

After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos stored procedure response with the created cosmos stored procedure. In case of failure the Mono 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.

createTrigger

public Mono createTrigger(CosmosTriggerProperties properties)

Creates a Cosmos trigger.

After subscription the operation will be performed. The Mono upon successful completion will contain a cosmos trigger response In case of failure the Mono will error.

Parameters:

properties - the cosmos trigger properties

Returns:

an Mono containing the single resource response with the created trigger or an error.

createUserDefinedFunction

public Mono createUserDefinedFunction(CosmosUserDefinedFunctionProperties properties)

Creates a cosmos user defined function.

After subscription the operation will be performed. The Mono upon successful completion will contain a single cosmos user defined function response. In case of failure the Mono 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.

getStoredProcedure

public CosmosAsyncStoredProcedure getStoredProcedure(String id)

Gets a CosmosAsyncStoredProcedure object without making a service call

Parameters:

id - id of the stored procedure

Returns:

a cosmos stored procedure

getTrigger

public CosmosAsyncTrigger getTrigger(String id)

Gets a CosmosAsyncTrigger object without making a service call

Parameters:

id - id of the cosmos trigger

Returns:

a cosmos trigger

getUserDefinedFunction

public CosmosAsyncUserDefinedFunction getUserDefinedFunction(String id)

Gets a CosmosAsyncUserDefinedFunction object without making a service call

Parameters:

id - id of the user defined function

Returns:

a cosmos user defined function

queryStoredProcedures

public CosmosPagedFlux queryStoredProcedures(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for stored procedures in a container.

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained stored procedures. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

querySpec - the SQL query specification.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained stored procedures or an error.

queryStoredProcedures

public CosmosPagedFlux queryStoredProcedures(String query, CosmosQueryRequestOptions options)

Query for stored procedures in a container.

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained stored procedures. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

query - the the query.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained stored procedures or an error.

queryTriggers

public CosmosPagedFlux queryTriggers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for triggers in the container

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained triggers. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

querySpec - the SQL query specification.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained triggers or an error.

queryTriggers

public CosmosPagedFlux queryTriggers(String query, CosmosQueryRequestOptions options)

Query for triggers in the container

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained triggers. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

query - the query.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained triggers or an error.

queryUserDefinedFunctions

public CosmosPagedFlux queryUserDefinedFunctions(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)

Query for user defined functions in the container.

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained user defined functions. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

querySpec - the SQL query specification.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained user defined functions or an error.

queryUserDefinedFunctions

public CosmosPagedFlux queryUserDefinedFunctions(String query, CosmosQueryRequestOptions options)

Query for user defined functions in the container.

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the obtained user defined functions. In case of failure the CosmosPagedFlux<T> will error.

Parameters:

query - the query.
options - the query request options.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the obtained user defined functions or an error.

readAllStoredProcedures

public CosmosPagedFlux readAllStoredProcedures()

Reads all cosmos stored procedures in a container.

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the read cosmos stored procedure properties. In case of failure the CosmosPagedFlux<T> will error.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the read cosmos stored procedures properties or an error.

readAllTriggers

public CosmosPagedFlux readAllTriggers()

Reads all triggers in a container

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the read cosmos trigger properties. In case of failure the CosmosPagedFlux<T> will error.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the read cosmos rigger properties or an error.

readAllUserDefinedFunctions

public CosmosPagedFlux readAllUserDefinedFunctions()

Reads all cosmos user defined functions in the container

After subscription the operation will be performed. The CosmosPagedFlux<T> will contain one or several feed response pages of the read user defined functions. In case of failure the CosmosPagedFlux<T> will error.

Returns:

a CosmosPagedFlux<T> containing one or several feed response pages of the read user defined functions or an error.

Applies to