
Should retrieve modified documents of a specified type from the Appwrite database by querying the timestamp.
func fetchModifiedDocuments<T: Codable>(
collectionId: String,
since timestamp: TimeInterval
) async throws -> [AppwriteModels.Document<T>] {
do {
let query = Query.greaterThan("$updatedAt", value: timestamp)
let documents = try await databases.listDocuments(
databaseId: AppwriteConstants.DATABASE_ID,
collectionId: collectionId,
queries: [query],
nestedType: T.self
)
return documents.documents
} catch {
print("Error fetching modified documents: \(error.localizedDescription)")
throw error
}
}
Error
Error fetching modified documents: Invalid query: Query value is invalid for attribute "$updatedAt" Error fetching decks: Invalid query: Query value is invalid for attribute "$updatedAt"
Recommended threads
- Can not login with OAuth
Hello everyone i am trying to login with ios and android in react native - expo but it is not successful. And this is the code which i am using to login
- I had a new error pop up today when test...
I've been working on my app, it worked fine previously but now I recieve Invalid Origin: Register your new client as a new iOS platform on your project console ...
- Appwrite DNS & iCloud Mail Server Setup
Hello, My DNS settings are managed through Appwrite, and I would like to add a custom email address to iCloud. I have never had any issues setting this up direc...
