You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to properly represent invariants about my models.
With invariants I mean properties of the inserted models which should always be true (or at least outside of a transaction).
In parts this could be represented by sql constraints. But this is hard accross DBs especially with constraints which would affect multiple tables. On top of that, sql constraints, usually, must hold even inside of a transaction. (I might be ignorant to some fancy sql features)
What do I expect from such a feature:
it should help with refactoring:
new code which violates the invariant should not compile (HARD)
old code which depended on a removed invariant should not compile (hopefully not so hard)
invariants should be readable as documentation
invariants should be checkable:
at program startup
in regular intervals
in assertions (maybe at the end of each transaction; maybe using hooks CRUD hooks #83)
I plan to implement inner table invariants (what could be represented with constraints) using #79 and new types.
(But it is not necessarily the only implementation of it)
(This could also be a galvyn feature built on top of #83)
The text was updated successfully, but these errors were encountered:
I want to properly represent invariants about my models.
With invariants I mean properties of the inserted models which should always be true (or at least outside of a transaction).
In parts this could be represented by sql constraints. But this is hard accross DBs especially with constraints which would affect multiple tables. On top of that, sql constraints, usually, must hold even inside of a transaction. (I might be ignorant to some fancy sql features)
What do I expect from such a feature:
I plan to implement inner table invariants (what could be represented with constraints) using #79 and new types.
(But it is not necessarily the only implementation of it)
(This could also be a galvyn feature built on top of #83)
The text was updated successfully, but these errors were encountered: