[odb-users] Web http client as database runtime
boris at codesynthesis.com
Thu Sep 30 10:33:00 EDT 2021
Adnan RIHAN <adnan at rihan.fr> writes:
> I'm writing a stock management app using Qt (currently, only a standalone
> version using QtSql and Sqlite), and I would like to support a "network
> mode". The easiest way I thought about would be to use an ORM like ODB and
> write a database runtime for web calls (GET calls for SELECT, POST/PUT for
> INSERT/UPDATE, DELETE for DELETE FROM, …).
> How would it be feasible to write a different runtime for ODB, and do
> you think it's a smart approach please?
I think it will be quite difficult both in terms of the amount of work
as well as in terms of trying to fit something like this into what ODB
expects (which is a transactional SQL database with prepared statement
support). Probably the easiest way would be to try to present your web
API as one of the existing database APIs (e.g., SQLite) or, maybe even
better, write a foreign table extension and use the existing database
API as a proxy.
More information about the odb-users