another useful sql for finding usable list of filenames that equate to a search
This commit is contained in:
5
README
5
README
@@ -108,3 +108,8 @@ sudo docker exec -it padb bash
|
|||||||
sudo docker exec -it padb bash
|
sudo docker exec -it padb bash
|
||||||
psql --user=pa pa
|
psql --user=pa pa
|
||||||
select count(distinct e.id) from entry e, entry_dir_link edl where e.type_id = 1 and e.id = edl.entry_id and edl.dir_eid in ( select distinct dir_eid from path_dir_link where path_id = 2 );
|
select count(distinct e.id) from entry e, entry_dir_link edl where e.type_id = 1 and e.id = edl.entry_id and edl.dir_eid in ( select distinct dir_eid from path_dir_link where path_id = 2 );
|
||||||
|
|
||||||
|
|
||||||
|
# get abs filenames of matching files (for liz person.tag, but could easily add
|
||||||
|
# d.rel_path like 'liz' too :
|
||||||
|
select '"'||replace(replace(p.path_prefix,'static/Storage/',''),'static/Import/', '')||'/'||d.rel_path||'/'||e.name||'"' from entry e, entry_dir_link edl, path_dir_link pdl, path p, dir d where e.id = edl.entry_id and edl.dir_eid = pdl.dir_eid and pdl.path_id = p.id and d.eid = edl.dir_eid and e.id in ( select e.id from entry e, face_file_link ffl, face_refimg_link frl, person_refimg_link prl, person p where e.id = ffl.file_eid and ffl.face_id = frl.face_id and frl.refimg_id = prl.refimg_id and prl.person_id = p.id and p.tag = 'liz' );
|
||||||
|
|||||||
Reference in New Issue
Block a user