BeforeNowFilter

class BeforeNowFilter @InternalWowApi constructor(val field: QueryField<*>, val offset: String = ZERO_OFFSET, val zoneId: String? = null, val datePattern: String? = null, val dateFormatter: DateTimeFormatter? = null, val timeUnit: TimeUnit = TimeUnit.MILLISECONDS) : RelativeTimeFilter

A moment relative to the server's clock: the field is before now + offset. The server resolves now once per query, so every condition of one query sees the same moment and the client's clock does not matter.

The offset is an ISO-8601 duration added to now: PT0S (the default) is now itself, -PT30M is 30 minutes ago.

Constructors

Link copied to clipboard
constructor(field: QueryField<*>, offset: String = ZERO_OFFSET, zoneId: String? = null, datePattern: String? = null, dateFormatter: DateTimeFormatter? = null, timeUnit: TimeUnit = TimeUnit.MILLISECONDS)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val dateFormatter: DateTimeFormatter?

A formatter given in process instead of datePattern; never written on the wire.

Link copied to clipboard
open override val datePattern: String?
Link copied to clipboard
open override val field: QueryField<*>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val operator: FilterOperator
Link copied to clipboard
open override val timeUnit: TimeUnit

Unit used for numeric time fields; ignored when a date formatter is configured.

Link copied to clipboard
open override val zoneId: String?

Functions

Link copied to clipboard
fun copy(field: QueryField<*> = this.field, offset: String = this.offset, zoneId: String? = this.zoneId, datePattern: String? = this.datePattern, dateFormatter: DateTimeFormatter? = this.dateFormatter, timeUnit: TimeUnit = this.timeUnit): BeforeNowFilter

This BeforeNowFilter with the given values replaced; for Wow's own query rewriting.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withField(field: QueryField<*>): BeforeNowFilter

This predicate naming field instead; everything else it carries is kept.