Skip to content

Commit 169e89d

Browse files
committed
🐛 Do not cast sort column value in min_cursor/2
1 parent 9ddc16b commit 169e89d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/sequin/databases_runtime/keyset_cursor.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ defmodule Sequin.DatabasesRuntime.KeysetCursor do
3131
Given a table and a minimum sort column value, return a cursor with the minimum values for all columns
3232
"""
3333
@spec min_cursor(%Table{}, any()) :: map()
34-
def min_cursor(%Table{} = table, min_sort_col_cursor_value) do
34+
def min_cursor(%Table{} = table, sort_col_value) do
3535
[sort_column | pk_columns] = cursor_columns(table)
3636

3737
pk_cursor =
3838
Map.new(pk_columns, fn column ->
3939
{column.attnum, min_for_type(column.type)}
4040
end)
4141

42-
sort_col_value = cast_value(sort_column, min_sort_col_cursor_value)
43-
4442
Map.put(pk_cursor, sort_column.attnum, sort_col_value)
4543
end
4644

0 commit comments

Comments
 (0)