Next live broadcast 09:00 UTC+1 https://youtu.be/sBdmwDUp1Ho Continuing the series covering the development of an online Bank web application using Clojure. This time we are improving the SQL code and covering more functions from next.jdbc library. This project is being actively developed at https://practicalli.github.io/clojure-webapps/projects/banking-on-clojure/
So far this week I have been trying to improve the SQL statements I am using and looking at how to use substitution.
Using the next.jdbc library, the
execute! function is the generic way to run an SQL statement.
Statements can be made generic by wrapping in a Clojure function and using
str to combine parts of the statement with arguments to that function.
next.jdbc also has specific
update! functions that make it easier to create generic SQL statements.
I've also been using DBeaver to redesign the database tables, export DDL scripts, produce more complete SQL statements, using fully qualified table names, etc.
I've updated the database tables schema and used simple connection managment and transactions to execute the SQL statements to create the database. https://practicalli.github.io/clojure-webapps/projects/banking-on-clojure/database-tables.html