migrations

Quickly Creating DB namespaces with shell, emacs, and init.sql

My project design includes creating a file/namespace for each database table, with a suite of CRUD operations applying to each table. The end result is that I have functions like db.my-table/CREATE, READ, UPDATE, and DELETE available for each table. The strategy is as follows: Establish the template clj file that has all your CRUD operations Obtain all table names (e.g. from init.sql) Use a script to create a matching clj file based on template (1) customized to refer to the tables from (2) 1.