Here's again the schema:
CREATE TABLE instance (
path TEXT,
basename TEXT,
size INT,
md5sum TEXT,
creation_date TEXT,
last_write_time TEXT,
FOREIGN KEY (md5sum) REFERENCES resource (md5sum)
);
CREATE TABLE resource (
md5sum TEXT,
data BLOB,
primary key(md5sum)
);
INSERT OR IGNORE INTO resource ...
INSERT OR REPLACE INTO instance ...
Thanks a lot. What is the idea behind the INSERT OR REPLACE in your
solution?
Christoph
If you edit a test for some version of your software, md5sum is
changed too. You must replace row in `instance`.
It just happened that I ran over the directory tree a second and a third
time.
Wouldn't the second and the third run result in being the records just
replaced (since they have the
same data in all columns and I don't have any uniqueness defined).
But instead I have three identical entries from each run.
--
Christoph
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users