Open campbellr opened 9 years ago
Table.has_id is used to determine whether or not to use MAX(id) vs COUNT(*) in count_for_pager, but this only works if the id field is an integer.
Table.has_id
MAX(id)
COUNT(*)
count_for_pager
id
In my schema i have an id that is a text type representing a UUID, which makes count_for_pager always return 0.
I think it might be safer to only use MAX(id) if has_id is true and the id field is some sort of integer type
has_id
Would you like to make a pull request?
Table.has_id
is used to determine whether or not to useMAX(id)
vsCOUNT(*)
incount_for_pager
, but this only works if theid
field is an integer.In my schema i have an id that is a text type representing a UUID, which makes
count_for_pager
always return 0.I think it might be safer to only use
MAX(id)
ifhas_id
is true and the id field is some sort of integer type