Published on in 💬 Micro
This day is successful: I created a recursive SQL CTE in SQLite even before noon. 🤓
with recursive f (i, fp, tp) as (select 1, fromPath, toPath
from redirects
where fromPath = ?
union all
select f.i + 1, r.fromPath, r.toPath
from redirects as r
join f on f.tp = r.fromPath)
select tp
from f
order by i desc
limit 1
This is for my new CMS project.