On 15 Jun 2010, at 4:23pm, Robert Latest wrote: > Instinctively I'd rather first SELECT, store the > results, finalize the SELECT statement and then get to work on its > result using the stored data. It's just that without intermediate > storage it's a bit easier (no need to do any ressource management), > and I've found nothing in the docs that says I shouldn't do that.
On a standard desktop system where RAM is cheap, your principle of storing all the SELECT data before beginning your changes is sound. Technically there's no reason not to interleave the _step() with changing the data, but it requires a detailed understanding of how SQLite works, especially if the changes you make would have changed the result of the SELECT command. [1] Storing all the SELECT data before making your changes means you don't have to understand these technicalities, and it ensures that your code is engine-agnostic in case you ever have to convert to using a different SQL engine. [1] I did a quick google for documentation on this but didn't find anything. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users