diff options
author | William Carroll <wpcarro@gmail.com> | 2020-07-27T13·21+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-07-27T13·23+0100 |
commit | c38814d7a155e5ced75b088b29cafa71a4a76de0 (patch) | |
tree | 5a0c8f5512aa60f3cc216c886f7194cd20ebf412 /src/API.hs | |
parent | dfe23e3b63ab61361fa34247abde006355f3914a (diff) |
Add CHECK constraints to schema
I believe data should be validated at each level of the stack: - database - server - client The database, in my opinion, is the most important layer at which to validate because you can eliminate entire classes of bugs. However, the CHECK constraint is limited, and the more complex the predicates are, the more expensive database operations become. At the server and client layers, the data validations can be more sophisticated and return more useful error messages to help users better understand the shape of the data that our application expects.
Diffstat (limited to 'src/API.hs')
0 files changed, 0 insertions, 0 deletions