Better demo.
This commit is contained in:
parent
a9adbd72ed
commit
3fff6a0aec
13
README.rst
13
README.rst
|
@ -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
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue