Skip to main content
 Warning: Beta Version
Version: Beta ⚠️

Query Entries

Sometimes you need to find an entry by any of it's fields or by type. This can be done with the Query class.

If you need to find all entries of a specific type:

val entries = Query.find<MyEntry>()

Sometimes you need it by a specific criteria:

val entries = Query.findWhere<MyEntry> {
it.someField == "some value"
}

You can also find a single entry:

val entry = Query.findFirstWhere<MyEntry> {
it.someField == "some value"
}

Sometimes you need to find an entry by it's id:

val entry = Query.findById<MyEntry>(id)

Other times you need to find entries by their page:

val entries = Query.findWhereFromPage<MyEntry>(pageId) {
it.someField == "some value"
}