Day 45
·Just like yesterday, I had a lot of work on my database to do today. I have to implement the SQL code that clojure executes to get the proper information to pass back to my code.
I spent the majority of my day getting these functions set up, along with their appropriate tests. I really liked how involved my tests ended up being; it was a clear example of improvement in my TDD that I noticed. It took some fiddling with the database, especially because it can’t handle multi-value columns. I had to set up some in-between tables to handle the 1-n relationships.
After the database query system was set up, I just had to get them paired up with my multi-methods for the save functionality I’m already using with file-saving. The seamless extension of my psqldb module into the rest of my system was something I really appreciated. I haven’t properly seen the benefits of OCP until now, so it was a huge ‘aha’ moment for me!
I had to work late today, but thankfully I got my database implementation ready to go for tomorrow and I’m ready for my presentation on Component Design as well!