Skip to content

Commit

Permalink
Deploying to gh-pages from @ 22ab957 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sake92 committed Sep 4, 2024
1 parent 8fa5007 commit 6e599a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tutorials/code-gen.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
padding-left: 3em;
font-size: .8em;
}
</style></head><body><div class="hidden-print"><nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"><div class="container-fluid"><a class="navbar-brand" href="../index.html"><span><img src="../images/favicon.ico" alt="logo" width="32" height="32" /></span> Squery</a><button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#main-navbar"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="main-navbar"><ul class="navbar-nav"></ul><ul class="navbar-nav ms-auto"><li class="nav-item"><a href="index.html" class="active nav-link">Tutorials</a></li><li class="nav-item"><a href="../howtos/index.html" class="nav-link">How-Tos</a></li><li class="nav-item"><a href="../reference/index.html" class="nav-link">Reference</a></li><li class="nav-item"><a href="../philosophy/index.html" class="nav-link">Philosophy</a></li></ul></div></div></nav></div><div class="container-fluid"><div class="row"><div class="col-md-3 d-flex justify-content-end hidden-print"><nav class="affix"><ul class="nav nav-pills flex-column"><li><a href="index.html" class="nav-link ">Tutorials</a></li><li><a href="getting-started.html" class="nav-link ">Getting Started</a></li><li><a href="code-gen.html" class="nav-link active">Code Generation</a></li></ul></nav></div><div data-bs-spy="scroll" data-bs-target="#tocScrollspy" class="col-md-6"><div class="hidden-print"></div><div><section id="code-generator"><h2>Code generator</h2><p>Squery has a standalone code generator that can generate code for various databases:<br />
</style></head><body><div class="hidden-print"><nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"><div class="container-fluid"><a class="navbar-brand" href="../index.html"><span><img src="../images/favicon.ico" alt="logo" width="32" height="32" /></span> Squery</a><button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#main-navbar"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="main-navbar"><ul class="navbar-nav"></ul><ul class="navbar-nav ms-auto"><li class="nav-item"><a href="index.html" class="active nav-link">Tutorials</a></li><li class="nav-item"><a href="../howtos/index.html" class="nav-link">How-Tos</a></li><li class="nav-item"><a href="../reference/index.html" class="nav-link">Reference</a></li><li class="nav-item"><a href="../philosophy/index.html" class="nav-link">Philosophy</a></li></ul></div></div></nav></div><div class="container-fluid"><div class="row"><div class="col-md-3 d-flex justify-content-end hidden-print"><nav class="affix"><ul class="nav nav-pills flex-column"><li><a href="index.html" class="nav-link ">Tutorials</a></li><li><a href="getting-started.html" class="nav-link ">Getting Started</a></li><li><a href="code-gen.html" class="nav-link active">Code Generation</a></li></ul></nav></div><div data-bs-spy="scroll" data-bs-target="#tocScrollspy" class="col-md-6"><div class="hidden-print"></div><div><section id="code-generator"><h2>Code generator</h2><p>Squery has a code generator that can generate code for various databases:<br />
Postgres, MySQL, MariaDB, Oracle and H2.</p>
<p>It generates models for table rows and handy DAO code with various utility methods:</p>
<ul>
Expand All @@ -41,6 +41,10 @@
<li>insert, updateById</li>
<li>deleteWhere, deleteById, deleteIds</li>
</ul>
<p>Squery codegene is a bit special since it is using <a href="https://github.com/sake92/regenesca">Regenesca library</a>.<br />
When you add a new column for example, it will refactor the <code>*Row</code> and <code>*Dao</code> code in place!<br />
This means you can add your own methods/vals to the <em>generated code</em>, without fear that the codegen will remove it.<br />
Of course, it is best to use <code>scalafmt</code> after codegen so that the diff is minimal.</p>
</section><section id="standalone-generator"><h2>Standalone generator</h2><p>You can use Ammonite to test the generator:</p>
<pre><code class="language-scala">import $ivy.`ba.sake:squery-generator_2.13:0.6.0`
import $ivy.`ba.sake::squery:0.6.0`
Expand Down

0 comments on commit 6e599a0

Please sign in to comment.