vitalseeds / vs-data-api

Fast API endpoints to expose vs-data actions for to run from Filemaker
MIT License
0 stars 0 forks source link

Pypika - FileMaker SQL package #37

Open tombola opened 8 months ago

tombola commented 8 months ago

Get Pypika working with pytests for FM SQL syntax, eg dates. Wrap this with a very simple database connection model using pypyodbc, again with tests.

This package intended to be used by a simple ORM.

* make swappable with pyodbc

See https://github.com/vitalseeds/vs-data-api/issues/4#issuecomment-1826380597

tombola commented 6 months ago

Use srvcs to provide and clean up database connection.

Consider also using protocols to define the shape of query builders etc?

tombola commented 6 months ago

It seems srvcs is pretty reliant on integration with a web framework, basically because it uses the request object to store the registry/container that holds the db conection etc, and the web framework teardown to close the connection

There is a FastAPI integration built in, so it should work when accessing the API endpoints, but not for the CLI, which is dissapointing, or for most tests.