justin-millman / Kvasir

A non-invasive object-relational mapping framework for a variety of back-end database providers
GNU General Public License v3.0
0 stars 1 forks source link

Use Generic Attributes for [DataConverter], [Check], and [Check.Compl… #114

Closed justin-millman closed 4 months ago

justin-millman commented 4 months ago

…ex] Annotations

This commit changes the [DataConverter], [Check], and [Check.Complex] annotations to be generic, rather than taking the type as a constructor argument. This allows for compile-time interface enforcement, and in the case of [DataConverter] a compile-time check for default constructibility. Because the generic argument is only relevant on construction to construct the underlying object, new abstract non-generic base classes have been introduced; these are necessary for the Translation layer to operate on e.g. all [Check] constraints equivalently regardless of what their generic argument was.

This resolves #112.