Also in the sdk-for-kotlin, the listDocuments function is different from what is mentioned in the nodejs template of sync with meilisearch.
The nodejs function is:
process.env.APPWRITE_DATABASE_ID,
process.env.APPWRITE_COLLECTION_ID,
queries
);```
The docs in sdk-for-kotlin says to use:
```databases.listDocuments( "[DATABASE_ID]", "[COLLECTION_ID]", new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; }
System.out.println(result);
})
);```
I'm confused on where to use the queries in java template?
Java -
databases.listDocuments("dbId", "collectionId", queries, callback);
Used above reference and got this error: /usr/local/server/src/main/java/io/openruntimes/java/src/Main.java:127: error: no suitable method found for listDocuments(String,String,List<String>)
DocumentList<Map<String, Object>> response = databases.listDocuments(
^
method Databases.<T#1>listDocuments(String,String,List<String>,Class<T#1>,Continuation<? super DocumentList<T#1>>) is not applicable
(cannot infer type-variable(s) T#1
(actual and formal argument lists differ in length))
method Databases.<T#2>listDocuments(String,String,Class<T#2>,Continuation<? super DocumentList<T#2>>) is not applicable
(cannot infer type-variable(s) T#2
(actual and formal argument lists differ in length))
method Databases.listDocuments(String,String,Continuation<? super DocumentList<Map<String,Object>>>) is not applicable
(argument mismatch; List<String> cannot be converted to Continuation<? super DocumentList<Map<String,Object>>>)
where T#1,T#2 are type-variables:
T#1 extends Object declared in method <T#1>listDocuments(String,String,List<String>,Class<T#1>,Continuation<? super DocumentList<T#1>>)
T#2 extends Object declared in method <T#2>listDocuments(String,String,Class<T#2>,Continuation<? super DocumentList<T#2>>)
code: DocumentList<Map<String, Object>> response = databases.listDocuments(
System.getenv("APPWRITE_DATABASE_ID").toString(),
System.getenv("APPWRITE_COLLECTION_ID").toString(),
queries
);
I think I misunderstood the function
What is the output of databases.getDocuments() function?
Input params are databaseID, collectionID and queries string.
Output is DocumentList right?
@Steven can you help me out here?
please do not tag people as it can be very disruptive
Recommended threads
- Rate limit blocking bulk function re-cre...
Hi team, I am on Appwrite Cloud (project: staging-dataspace, SGP region). I am in the midst of deleting ~115 functions that were stuck with .fra.appwrite.run do...
- Unable to connect the git repo with appw...
I am trying to connect my existing repo with the appwrite functions. I have 2 functions in the same repo, and i was able to execute those through cli and its vi...
- Creating a function on appwrite Cloud.
I am trying to create a function on Appwrite cloud. I go to the console. I hit : Create function I choose DART-3.5 I put a name for my function : NameFunction...