I have the following sql variable:
SELECT * FROM x WHERE x.Description CONTAINS(@p1)
I have configured a SQL Parameter with name @p1 and a valid string i.e. "foo" and added it to the SqlParameterCollection collection variable with the following:
var sqlQuery = new SqlQuerySpec(sql, collection);
I then invoke the following query.
var query = _documentClient.CreateDocumentQuery<T>(GetDocumentCollectionUri<T>(graphRequestContext), sqlQuery, options).AsDocumentQuery();
I am getting the following error:
Message: Microsoft.Azure.Documents.DocumentClientException : Message: {"errors":[{"severity":"Error","location":{"start":37,"end":45},"code":"SC1001","message":"Syntax error, incorrect syntax near 'CONTAINS'."}]} ActivityId: <Removed for privacy reasons>, Microsoft.Azure.Documents.Common/2.2.0.0, Windows/10.0.17763 documentdb-netcore-sdk/2.2.2
Per documentation (https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-query-reference), it seems to be looking for a string expression. Thus, I am looking for confirmation on this, if this is in fact the case.