Skip to content

Domain logic and SQL #95

Answered by Sairyss
Kainar01 asked this question in Q&A
Feb 17, 2023 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

Hey.

What do you mean by "validations that use SQL"? Also, I don't understand why do you want to use commands/events for validation, seems like you are overthinking it a little.

You need to validate data that comes from a database, am I understanding it correctly? If so, I see two options:

  1. If your database is accessed only by your app and nothing else, and all input that you save is validated (in your controllers for example), I don't see much sense validating it again when you query, since it's already validated before it was saved (you could do it just for the extra safety if you prefer though)
  2. If your database is accessed by something else (some other app, or directly by team members)…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Kainar01
Comment options

@Sairyss
Comment options

@Kainar01
Comment options

@emedina
Comment options

@Kainar01
Comment options

Answer selected by Kainar01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants