All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.maryk.test.requests.scanChanges.kt Maven / Gradle / Ivy

Go to download

Maryk is a Kotlin Multiplatform library which helps you to store, query and send data in a structured way over multiple platforms. The data store stores any value with a version, so it is possible to request only the changed data or live listen for updates.

The newest version!
package maryk.test.requests

import maryk.core.models.graph
import maryk.core.models.key
import maryk.core.query.filters.Exists
import maryk.core.query.orders.descending
import maryk.core.query.requests.scanChanges
import maryk.test.models.SimpleMarykModel
import maryk.test.models.TestMarykModel

private val testKey1 = TestMarykModel.key("AAACKwEAAg")

val scanChangesRequest = SimpleMarykModel.scanChanges()

val scanChangesMaxRequest = TestMarykModel.run {
    scanChanges(
        startKey = testKey1,
        where = Exists(invoke { uint::ref }),
        order = this { uint::ref }.descending(),
        limit = 300u,
        includeStart = false,
        toVersion = 2345uL,
        fromVersion = 1234uL,
        maxVersions = 10u,
        select = graph { listOf(uint) }
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy