Cosmos DB gremlin API中的选择和选项步骤

时间:2019-04-18 08:51:54

标签: gremlin azure-cosmosdb-gremlinapi

尽管[HttpPost] public void Post([FromForm] Model value) { var apiUrl = value.ApiUrl; // http://api.com/start/1 var interval = value.Interval; RecurringJob.AddOrUpdate(value.ApiName, () => RunInBackground(apiUrl), Cron.MinuteInterval(value.Interval)); var api = JobStorage.Current.GetMonitoringApi(); } [DisableConcurrentExecutionWithParametersAttribute(timeoutInSeconds: 10 * 60)] [AutomaticRetry(Attempts = 0)] public async Task<bool> RunInBackground(string Url) { using (HttpClient httpClient = new HttpClient()) { var response = await httpClient.GetAsync(Url); httpClient.DefaultRequestHeaders.Accept.Clear(); httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var responseFromApi = await response.Content.ReadAsStringAsync(); return true; } } 不在list of supported gremlin steps for Cosmos DB上(以及其他一些),但似乎受到支持。给定一个带有人的示例图,它是一个类似

的查询
choose

返回一个json数组g.V().hasLabel('person').choose(values('name')) .option('josh', constant('it's Josh!')) 。添加更多选项也可以,例如

['Josh!']

但是似乎不起作用的是使用g.V().hasLabel('person').choose(values('name')) .option('josh', constant('it's Josh!')) .option('marco', constant('it's marco!')) / Pick.none来指定默认情况,如gremlin docs for choose中所述,例如

none

有人知道如何在Cosmos DB中指定默认大小写吗?我已经尝试过任何包含g.V().hasLabel('person').choose(values('name')) .option('josh', constant('it's Josh!')) .option('marco', constant('it's marco!')) .option(none, constant('it's somebody else!')) 和/或Pick的排列,例如nonePick.nonePick().none()none,...

0 个答案:

没有答案