.toISOString() on endingAfter, but it doesn't seem to do that automatically in this case, I assume because it doesn't have the column information because the first arguments is an SQL<unknown>. I've tried various things to get this right; using a type parameter for the sql, using .mapWith() with a timestamp column, but haven't managed to come up with the correct magic.