Is it hard to implement some way where you could add the option to create a sql-query in the playlists-table ?
No, in fact they used to be raw sql. But that limits my database backend to being sql. I need to be able to support arbitrary backend databases, particularly to be able to use the server as a daap server for a separate music collection (webjuke, xmms2, etc). Or even to be able to use it with a slimmer db backend (gdb), or a non-db backend (Topfield PVR).
In short, it just makes sense to abstract the backend. ‘Course, I could just write a sql parser and interpret the sql command against an abstract backend, but it’s easier to use a tiny query languge and convert that to sql rather than the other way around.