El nostre lloc de coneixement compartit
Support:
Traduccions:
Documentació Mòduls:
select
case when "isFolder"=True then '#'||repeat('#',depth)||' '||repeat(' ',(depth-1)*2)||title
else '* ['||title||'](/'||path||')'
end as text
from "pageTree"
where "localeCode"='ca'
order by SPLIT_PART(path,'/',1)
,case when SPLIT_PART(path,'/',2) is null or depth<2 then 'aaaaaaaaaaaaaa'
when not "isFolder" and depth=2 then 'aaaaaaaaaaaaab'
else path end
,case when SPLIT_PART(path,'/',3) is null or depth<3 then 'aaaaaaaaaaaaaa'
when not "isFolder" and depth=3 then 'aaaaaaaaaaaaab'
else path end
,case when SPLIT_PART(path,'/',4) is null or depth<4 then 'aaaaaaaaaaaaaa'
when not "isFolder" and depth=4 then 'aaaaaaaaaaaaab'
else path end