rangeLt()
Only relevant for range columns. Match only rows where every element in
column
is less than any element in range
.
1const { data, error } = await supabase 2 .from('reservations') 3 .select() 4 .rangeLt('during', '[2000-01-01 15:00, 2000-01-01 16:00)')
Parameters#
columnrequired
ColumnName
The range column to filter on
rangerequired
string
The range to filter with
Examples#
With select()
#
Postgres supports a number of range types. You can filter on range columns using the string representation of range values.
1create table
2 reservations (
3 id int8 primary key,
4 room_name text,
5 during tsrange
6 );
7
8insert into
9 reservations (id, room_name, during)
10values
11 (1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'),
12 (2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)');