I have a website hosted on a Linux server. The backend is done in Flask, and the database I am using is SQLite3 (with Flask-SQLAlchemy). The problem is that I needed to do a large query like in the next line.
for lhour in hour.query.filter(hour.id.in_([id_hour for id_hour in range(start_at , hour.query.count()+1)])):
The code above just does a query for all the hours where the id is bigger than the start_at variable, however the number of rows in the hours table is well over 999 (the maximum allowed in SQLite3 prior to version 3.32.0) so this would throw an error whenever the start_at variable was lower than 1600 (as the number of rows in the hour table is 2600).
After reading that for versions after 3.32.0 the maximum allowed is 32766, I compiled the source code and installed version 3.34.1 of SQLite3 on my Linux server.
However, the line of code would still throw the exact same error, so what version of SQLite3 does Flask-SQLAlchemy use and how do you set it so it uses the correct one?


