anchor.diff:                                             (couchfun (doc &aux (type (hashget doc "type")))
                                                (cond ((string= type "scene")
                                                       (emit (list (hashget doc "_id") 0) doc))
  -                                                   ((string= type "scene-action")
  +                                                   ((string= type "scene-untry")
                                                       (emit (list (hashget doc "scene_id")
                                                                   1
                                                                   (hashget doc "timestamp"))
                                                             doc))
                                                      (t nil))))
  -                                    "actions_by_scene_id"
  +                                    "entries_by_scene_id"
                                       (mkdoc "map"
  -                                           (mapfun doc "scene-action"
  +                                           (mapfun doc "scene-entry"
                                                (emit (hashget doc "scene_id")
                                                      doc)))
                                       "rating_by_scene_id"
  
positive.code: (defun find-scenes-by-account-name (account-name)
    (view-query-value "scene" "by_account_name" account-name nil))
  
  (defun find-scene-with-actions (scene-id)
    (when-let ((results (doc-val (query-view *db* "scene" "full_by_id"
                                             :startkey (list scene-id)
                                             :endkey (list scene-id 2))
                                 "rows")))
      (mapcar (rcurry #'doc-val "value") results)))
  
  (defun find-scene-actions (scene-id)
    (view-query-value "scene" "actions_by_scene_id" scene-id nil))
  
negative.code: (cl:defpackage #:sykosomatic.scene
    (:use :cl :alexandria :chillax.core :sykosomatic.db)
    (:export :create-scene :add-action :add-dialogue
             :find-scenes-by-account-name :find-scene-with-entries :find-scene-entries
             :scene-id :scene-upvote :scene-rating))
  (cl:in-package #:sykosomatic.scene)
  
  