Skip to content

Commit

Permalink
Add note to generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sake92 committed Sep 4, 2024
1 parent b6d8369 commit 22ab957
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/src/files/tutorials/CodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ object CodeGen extends TutorialPage {
val introSection = Section(
"Code generator",
s"""
Squery has a standalone code generator that can generate code for various databases:
Squery has a code generator that can generate code for various databases:
Postgres, MySQL, MariaDB, Oracle and H2.
It generates models for table rows and handy DAO code with various utility methods:
- countAll, countWhere
- findAll, findWhere, findWhereOpt, findAllWhere, findById, findByIdOpt, findByIds
- insert, updateById
- deleteWhere, deleteById, deleteIds
Squery codegene is a bit special since it is using [Regenesca library](https://github.com/sake92/regenesca).
When you add a new column for example, it will refactor the `*Row` and `*Dao` code in place!
This means you can add your own methods/vals to the *generated code*, without fear that the codegen will remove it.
Of course, it is best to use `scalafmt` after codegen so that the diff is minimal.
""".md
)

Expand Down

0 comments on commit 22ab957

Please sign in to comment.