 
 (defn save-head!
   [head]
+  (log/info "Saving head:" head)
   (insert heads
           (values head)))
 
 (defn update-head!
   [head]
+  (log/info "Updating head" (:name head) "with values" head)
   (update heads
           (set-fields head)
           (where {:name (:name head)})))
 
 (defn delete-head!
   [head]
+  (log/warn "Deleting head" head "!")
   (delete heads
           (where {:name (:name head)})))
 

(ns doctopus.db
  (:require [korma.db :refer [defdb postgres]]
            [clojure.string :as string :refer [split-lines]]
            [korma.core :refer :all]
            [clj-time.coerce :refer [to-sql-time]]
            [clj-time.core :as clj-time]
            [camel-snake-kebab.core :refer [->snake_case_keyword ->kebab-case-keyword]]
            [camel-snake-kebab.extras :refer [transform-keys]]
            [doctopus.configuration :refer [server-config]]))

(defn- now
  []


(defn save-tentacle!
  [tentacle]
  (log/info "Saving tentacle:" tentacle)
  (insert tentacles
          (values tentacle)))

(defn update-tentacle!
  [tentacle]
  (log/info "Updating tentacle" (:name tentacle) "with values:" tentacle)
  (update tentacles
          (set-fields tentacle)
          (where {:name (:name tentacle)})))

(defn delete-tentacle!
  [tentacle]
  (log/warn "Deleting tentacle:" tentacle "!")
  (delete tentacles
          (where {:name (:name tentacle)})))

