On Oct 16, 2019, at 11:42 PM, Peng Yu <pengyu...@gmail.com> wrote:
> 
> Suppose A is a sqlite3 db file, B is some other file which is
> generated based on the content in A. When A is not changed, there is
> no need to change B, otherwise, B will need to be regenerated. In
> other words, B depends on A, and can be handled by tools dealing with
> dependencies (e.g., GNU Make, Scons).
> 
> Many people replied to this thread suggesting not to directly use
> sqlite3, but access the sqlite3 database via a network interface. That
> will not be an option, as I don't think a network interface can be
> easily supported by those dependency checking tools like GNU Make.

$ echo 'select count(*) from MyTable where rowid > 1234' |
  nc dbserver 8888

That will return the number of new rows added to MyTable since the last-known 
highest row ID 1234, which we remembered previously as the highest ID used for 
generating output file B from DB A.  If the output of the command is 0, B 
doesn’t have to be re-generated.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to