|
@@ -373,12 +373,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
|
|
|
{
|
|
|
|
|
|
StringBuilder sql = new StringBuilder("select value(c) from c");
|
|
|
- SQLHelperParametric.GetSQL(dict,sql);
|
|
|
- CosmosDbQuery cosmosDbQuery = new CosmosDbQuery
|
|
|
- {
|
|
|
- QueryText = sql.ToString()
|
|
|
-
|
|
|
- };
|
|
|
+ CosmosDbQuery cosmosDbQuery = SQLHelperParametric.GetSQL(dict,sql);
|
|
|
QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(itemsPerPage, maxItemCount));
|
|
|
return await ResultsFromQueryAndOptions<T>(cosmosDbQuery, queryRequestOptions);
|
|
|
}
|
|
@@ -622,20 +617,6 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
|
|
|
return response.Resource;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- public async Task<List<T>> FindByDictTest<T>(Dictionary<string, object> dict, int itemsPerPage = 1, int? maxItemCount = 1, string partitionKey = null) where T : ID
|
|
|
- {
|
|
|
- //Container container = await InitializeCollection<T>();
|
|
|
- StringBuilder sql = new StringBuilder("select value(c) from c");
|
|
|
- CosmosDbQuery cosmosDbQuery = SQLHelperParametric.GetSQL(dict, sql);
|
|
|
- QueryRequestOptions queryRequestOptions = GetDefaultQueryRequestOptions(itemsPerPage: GetEffectivePageSize(itemsPerPage, maxItemCount));
|
|
|
-
|
|
|
- //FeedIterator<T> feedIterator = container
|
|
|
- // .GetItemQueryIterator<T>(cosmosDbQuery.CosmosQueryDefinition);
|
|
|
- // return (await ResultsFromFeedIterator(feedIterator)).SingleOrDefault();
|
|
|
-
|
|
|
-
|
|
|
- return await ResultsFromQueryAndOptions<T>(cosmosDbQuery, queryRequestOptions, maxItemCount);
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|