Better demo.

This commit is contained in:
Elf M. Sternberg 2016-07-12 20:31:12 -07:00
parent a9adbd72ed
commit 3fff6a0aec
1 changed files with 5 additions and 8 deletions

View File

@ -17,14 +17,11 @@ catalog program, `Catalogia<http://github.com/elfsternberg/catalogia>`.
:: ::
SELECT dirname(mp3a.path) AS parent, WITH prepped_paths AS (SELECT DISTINCT dirname(path) AS dpath FROM catalog_mp3)
dirname(mp3b.path) AS child SELECT a.dpath AS parent, b.dpath AS child
FROM catalog_mp3 AS mp3a, FROM prepped_paths AS a, prepped_paths AS b
catalog_mp3 AS mp3b WHERE a.dpath != b.dpath
WHERE dirname(mp3a.path) != dirname(mp3b.path) AND a.dpath ~ ('^' || b.dpath);
AND ('^' || dirname(mp3b.path)) ~ dirname(mp3a.path);
By the way, that's *hideously* inefficient, but it worked as a demo!
LICENSE AND COPYRIGHT NOTICE: NO WARRANTY GRANTED OR IMPLIED LICENSE AND COPYRIGHT NOTICE: NO WARRANTY GRANTED OR IMPLIED
------------------------------------------------------------ ------------------------------------------------------------