3 ms·
> If end users need a direct line to the database, then get your RBAC nailed down and open the DB's port up to the end user. I'd really consider creating a new
by delusional 2y ago
> If end users need a direct line to the database, then get your RBAC nailed down and open the DB's port up to the end user.
I'd really consider creating a new table just for this "database interface" That'll let you keep evolving your internal architecture while preserving backwards compatibility for the client. That won't work in all cases obviously, but I think it's suitable for most of the "sensible" ones.
- everforward 2y agoI thought the prevailing advice was to expose views (materialized or not) rather than tables directly, but I could be wrong or outdated. I still probably wouldn’t do it, though. My “lazy” solution is usually OpenAPI code generation so I basically only have to fill in the SQL queries. Not having any code gives me the nagging feeling that very soon I will hit a problem that’s trivial to fix in code but impossible or very stupid to do via a SQL query.