Connect to multiple databases programmtically?

Hi, in my use case the worker would be connecting to different databases based on a parameter of the url, for instance:
“/api/db/{guid}/data?orderby=…&offset=…&…”

I’ve noticed that I have to connect the worker beforehand to a D1 instance but will this use case ever be supported ?

Cheers.