ontodev / valve.rs

A lightweight validation engine written in rust.
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Call validate_row() when updating rows or inserting new ones #54

Closed lmcmicu closed 1 year ago

lmcmicu commented 1 year ago

Previously it was assumed that the calling application would always call validate_row() before attempting to insert or update it. We should not leave this responsibility to the calling application, since trying to insert a row that has not been previously prepared by the validate_row() function may result in panics as a result of database errors (e.g., constraint violations, etc.)