net.nemerosa.ontrack.model.search.dsl.SearchQueryDsl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.search.dsl
import net.nemerosa.ontrack.model.search.*
/**
* DSL marker for the search DSL
*/
@DslMarker
annotation class SearchQueryDsl
@SearchQueryDsl
fun query(dsl: SearchQueryDslBuilder.() -> SearchQuery): SearchQuery = SearchQueryDslBuilder().dsl()
@SearchQueryDsl
class SearchQueryDslBuilder {
infix fun String.eq(any: Any): SearchQuery = SearchEqQuery(this, any)
infix fun String.gt(any: Any): SearchQuery = SearchGtQuery(this, any)
infix fun String.lt(any: Any): SearchQuery = SearchLtQuery(this, any)
infix fun SearchQuery.or(other: SearchQuery): SearchQuery = SearchOrQuery(this, other)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy