My question comes from the need to write a query that uses an array of ints as filter for an Id column.
The number of IDs is high, and it surpasses easily the 1000 limit of any provider for the IN clause.
I usually solve this creating a temp table with 1 column, dump every ID I have into the table and join the table with the ID column i want to filter. This works nicely if I can write a DBMS-specific command, because the temp table creation is different from DBMS to DBMS (from the Sqlite CREATE TEMP TABLE to the SQL Server CREATE TABLE #name). The big problem is that our application should support at least: SQL Server and Postgres for production environment and Sqlite for debug purposes.
Is there a way or some kind of support from OrmLite?
I imagine a table marked as
[Temporary] or something like that.
If you have alternative solutions to the massive Sql.In issue, feel free to share them.