【发布时间】:2017-05-29 15:43:04
【问题描述】:
我正在尝试查询我的本地表以获取特定的数据集,但我不断收到语法错误。使用 where 子句的正确方法是什么。我在看这个资源:
https://azure.github.io/azure-mobile-apps-js-client/MobileServiceSqliteStore.html#read
而且我无法让我的代码正常运行。只需简单阅读,我就能获得表格的完整数据集。
this.azureStore = new WindowsAzure.MobileServiceSqliteStore('db_offline');
var queryString = "EventId eq " +
eventId + " and Start gt datetime('" +
moment.utc(dayDate).startOf('day').format('YYYY-MM-DDTHH:mm:00') + "Z') and Start lt datetime('" +
moment.utc(dayDate).endOf('day').format('YYYY-MM-DDTHH:mm:00') + "Z')";
this.azureStore.read(new WindowsAzure.Query('Timeslots').where(queryString));
【问题讨论】:
标签: javascript azure azure-mobile-services