Re:Permazen: Language-natural persistence to KV stores
by ianlevesque on Wednesday September 20, 2023 @01:39AM
(#37580738)
jOOQ is pretty great, and recently got good Kotlin support. My only complaint is if you use their DSL you lose the SQL syntax highlighting JetBrains IDEs have.
[ Parent
| on HN ]
Re:Permazen: Language-natural persistence to KV stores
by selimco on Wednesday September 20, 2023 @03:01AM
(#37581225)
In kotlin (maybe also java?) you can use the jetbrains @Language annotation to get syntax highlighting on string variables. A little more verbose but maybe it works for you.
Re:Permazen: Language-natural persistence to KV stores
by gregopet on Wednesday September 20, 2023 @03:17AM
(#37581335)
jOOQ doesn't work with string variables (I mean it can, but that's not the point of that library). It compiles your database schema into objects and then you invoke a very SQL-like API over them. The code then reads very close to the actual SQL and since the schema is encoded in the Java objects you get the usual code completion for things like columns, tables, stored procedures, indices..
What you don't get is the more advanced, entire-query-level hints, because IDE's can't tell that Java / Kotlin / ... code is actually the SQL that will be emitted if you squint just a little bit :)