cesium-ml / baselayer

Fully customizable (scientific, compute-intensive) web application template
http://cesium-ml.org/baselayer/
31 stars 18 forks source link

Select statements and Session #316

Closed guynir42 closed 2 years ago

guynir42 commented 2 years ago

his PR introduces scoped sessions with user access verification.

It also introduces new methods on the Base model, to allow querying using the new "select" style compatible with SQLA 2.0

It also fixes the behavior of get_if_accessible_by to respond exactly the same if the row requested does not exist or if it is not accessible.

This is mostly backward compatible, but a separate PR to skyportal fixes the few issues in the handlers and the tests that are broken by this change.

Most importantly, it allows us to move each handler separately into the new SQLA 2.0 style without having to change everything at once.