13. Database Interaction and the Application Layer
Activity 13.01: Persisting Historic Tennis Results and ELO Calculations
Solution:
- In a new project, begin with the following dependencies:
{:deps {clojure.java-time {:mvn/version "0.3.2"} hikari-cp {:mvn/version "2.8.0"} org.apache.derby/derby {:mvn/version "10.14.2.0"} org.clojure/data.csv {:mvn/version "0.1.4"} org.clojure/java.jdbc {:mvn/version "0.7.9"} semantic-csv {:mvn/version "0.2.1-alpha1"}}}
- In our
src
directory, create the following namespaces:packt-clj.tennis.database packt-clj.tennis.elo packt-clj.tennis.ingest packt-clj.tennis.parse packt-clj.tennis.query
- Creating our connection pool in the database namespace...