class

Lustra::Expression::Node::InRange

Inherits Lustra::Expression::Node < Lustra::Expression::JSONB::Node < Lustra::Expression::Geometric::Node < Reference < Object

A node managing the rendering a range in Postgres.

Example:

value.in?(1..5)  # value >= 1 AND value <= 5
value.in?(1...5) # value >= 1 AND value < 5

Supports beginless and endless ranges:

value.in?(..10)  # value <= 10
value.in?(1..)   # value >= 1
value.in?(...10) # value < 10
value.in?(...)   # TRUE (matches all values)

Inclusion and exclusion of the last number of the range is featured

Constructors

new(target : Node, range : Range(String | Nil, String | Nil), exclusive : Bool = false)
Source

Instance methods

resolve
Source