SQL语句:
SELECT DISTINCT * messages FROM messages WHERE sender_id = 1
进入 Azure 移动服务
messagesTable.where().field("sender_id").eq(1).execute().get();
问题是选择不同的列。这是在 Android 上。
最佳答案
听起来您想使用Android客户端SDK for Azure Mobile Apps编写查询DISTINCT
列的代码,但没有任何方法直接支持它通过Query
Android客户端SDK上的接口(interface)。
唯一的方法是calling a custom API从android客户端在后端服务器执行自定义SQL语句,请引用文档部分Custom APIs
的如何:执行自定义SQL语句
小节和 data/execute
Node.js 后端的方法。
关于java - 将 SQL 查询转换为 Android Azure 移动服务查询 - DISTINCT 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43155556/