SQLite may throw the following error:
Expression tree is too large (maximum depth 1000)
The reason is quite simple: your tried to issue a query with too many parameters. This may occurr when building queries like "DELETE FROM t WHERE id=x1 OR id=x2 OR id=x3 ..." with more than 1000 id values.
So if creating such queries, you should ensure to split them up do several queries.