[英]How to search data in aws amplify datastore using @searchable in android(java)?
I read this documentation: https://docs.amplify.aws/cli-legacy/graphql-transformer/searchable/#definition But how to impliment the query in android studio using java.What are the methods of Amplify to get search query?
Amplify.DataStore.query(
Product.class,
items -> {
while (items.hasNext()) {
Product item = items.next();
Log.i("Amplify", "Id " + item.getId());
}
},
failure -> Log.e("Amplify", "Could not query DataStore", failure)
);
您可以在此處查看完整文檔https://docs.amplify.aws/lib/datastore/data-access/q/platform/android/#create-and-update
還有一些例子https://github.com/enlearacademy/chatme-android-amplify https://aws.amazon.com/es/getting-started/hands-on/build-android-app-amplify/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.