I want to check if an object exists in the database. I wuld like to do something like this:
fun <T> containsDocumentThat(matches: T.() -> Boolean, clazz: Class<T>): Boolean =
arango.db(DbName.of(database))
.takeIf { it.exists() }
?.collection(name)
?.takeIf { it.exists() }
?.readAll(clazz)
?.find { it.matches() }
?: false
But there is no such thing like readAll() or find(class, object) in the API.
Did someone try to do such search and succeeded?