crsql_as_ordered would fail if the table schema specified a type for the column used to order by.
E.g.,
CREATE TABLE test (id, spot TEXT, list TEXT);
Assigning TEXT to spot would cause inserts to spot to be treated as text. This meant out -1 and 1 shorthand for pre-pend and append would fail to compare and write an invalid fractional index. Fix that by casting the ordering column before using it.
crsql_as_ordered
would fail if the table schema specified a type for the column used to order by.E.g.,
Assigning
TEXT
tospot
would cause inserts to spot to be treated as text. This meant out-1
and1
shorthand for pre-pend and append would fail to compare and write an invalid fractional index. Fix that by casting theordering
column before using it.