Hi,
I think I'm a bit thick with this, but I just can't wrap my head around the difference (and more importantly the need) for both Allow and Require annotations with jooq-checker.
Maybe it's because my use case does not need both, so let me explain what it is:
- I have some code (maybe used by different applications, so it's kind of library code) that do db related stuffs, and if it is possible, I want this code as generic as possible w.r.t. the database dialect
- because I mostly use postgresql, sometimes I use postgresql-specific features (still in library code)
- in some specific cases, I DO know which database I am using (disclaimer: it's postgresql :P) for my application (so it's not library code)
What I did is annotate most of this code with `Allow(SQLDialect.DEFAULT)` and when it wasn't enough, I used `Allow(SQLDIALECT.POSTGRES)`.
Some questions:
- I'm not sure it is correct to use the DEFAULT dialect for this, but I suppose it is?
- I don't see the need for Require here, is it only needed when I am working with multiple dialects (not DEFAULT) at the same?
- Is Allow some kind of architecture-level rule while Require some kind of class-level assertion?
Thanks for any help to understand this :)