QueryDefinition.WithParameterStream(String, Stream) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Add parameters with Stream Value to the SQL query.
public Microsoft.Azure.Cosmos.QueryDefinition WithParameterStream (string name, System.IO.Stream valueStream);
member this.WithParameterStream : string * System.IO.Stream -> Microsoft.Azure.Cosmos.QueryDefinition
Public Function WithParameterStream (name As String, valueStream As Stream) As QueryDefinition
Parameters
- name
- String
The name of the parameter.
- valueStream
- Stream
The stream value for the parameter.
Returns
An instance of QueryDefinition.
Examples
QueryDefinition query = new QueryDefinition(
"select * from t where t.Account = @account")
.WithParameterStream("@account", streamValue);
Remarks
UseCase : This is useful in cases like running a Query on Encrypted Values, where the value is generated post serialization and then encrypted and we don't want to change the cipher value due to a call to serializer again. If the same name is added again it will replace the original value.