Description
What are you building with SQLPage ?
I'd like to build a pixiecore api server based on SQL Page.
What is your problem ? A description of the problem, not the solution you are proposing.
The server has to answer requests to the following path: <apiserver-prefix>/v1/boot/<mac-addr>
.
The last part of the path is the actual argument to the API call. To the best of my knowledge, there is no way in SQLpage to have a one or multiple arbitrary paths served by a single .sql
file. There is of course index.sql
, but that maps one path to one .sql
file.
What are you currently doing ? Since your solution is not implemented in SQLPage currently, what are you doing instead ?
Introducing a map in the configuration, mapping URL paths to .sql
files. When the current URL path starts with the key of an entry from that map, use the corresponding value from the map as path to a .sql
file and execute it. Otherwise, carry on as usual.
Describe alternatives you've considered
Having a special name, e.g. if in a directory there is a _catch_all.sql
then only that is considered for any URL whose path goes into this directory.