 (defn update-wishlist [wishlist]
   (let [{:keys [id]} wishlist]
     (sql/with-connection db
-	  (sql/update-values :wishlist ["id=?" id] wishlist))))
+      (sql/update-values :wishlist ["id=?" id] wishlist))))
 
 (defn get-wishes-for-wishlist [{:keys [id]}]
   (sql/with-connection db
     (sql/with-query-results results
-	  ["select * from wish where wishlist=?" id]
-	  (into [] results))))
+      ["select * from wish where wishlist=?" id]
+      (into [] results))))
 
 (defn insert-wish [wish {:keys [id]}]
   (sql/with-connection db

(defn update-wishlist [wish]
  (let [{:keys [id]} wish]
    (sql/with-connection db
	  (sql/update-values :wish ["id=?" id] wish))))
;[:wishlist :int]
;["constraint fk_wish_wishlist foreign key(wishlist) references Wishlist(id) on delete cascade"])))

(defn get-wishlist-by-code [{:keys [code]}] ; code is unique not null
  (sql/with-connection db
    (sql/with-query-results results
      ["select * from wishlist where code=?" code]
      (first (into [] results)))))

(defn get-wishlist-by-id [{:keys [id]}]
  (sql/with-connection db
    (sql/with-query-results results
      ["select * from wishlist where id=?" id]
      (first (into [] results)))))

(defn insert-wishlist [wishlist]
  (sql/with-connection db
    (sql/insert-records :wishlist wishlist)))

(defn delete-wishlist [{:keys [code]}] ; code is unique not null
  (sql/with-connection db
