anchor.diff:  (defun insert (model object &key use-key (stash-key *stash-key*) (to-json *to-json*))
     "Insert lisp object OBJECT into the backend MODEL, a symbol,
   after JSON serialization.  If USE-KEY is supplied, use that as the
  -primary key for this object rather than the automatically generated
  -one.  If STASH-KEY is non null we FUNCALL it with two arguments: the
  -value of the key to be used for the DB insert and OBJECT.  It should
  -return an object which will be inserted in the place of the original.
  -Typically you would use this to 'stash' the fresh primary key inside
  -your object.  TO-JSON must be a function designator for a function of
  -one argument to serialize lisp objects to JSON strings.  Return the
  -new primary key."
  +primary key for the JSON document rather than the automatically
  +generated one.  If STASH-KEY is non null we FUNCALL it with two
  +arguments: the value of the key to be used for the DB insert and
  +OBJECT.  It should return an object which will be inserted in the
  +place of the original.  Typically you would use this to 'stash' the
  +fresh primary key inside your object before serialization.  TO-JSON
  +must be a function designator for a function of one argument to
  +serialize lisp objects to JSON strings.  Return the new primary key."
     (log:debu3 "Attempt insert of object into ~A" model)
     (unless use-key
       (ensure-model-query model 'nextval-sequence$))
  
positive.code: 
  ;; Implicit (or even explicit) assumption here that you are storing
  ;; objects in your model, rather than arrays...
  (defun filter (model &key contain keys limit
                            (to-json *to-json*) (from-json *from-json*))
    "Return all objects in MODEL, a symbol, which 'contain' in the
  Postgres @> operator sense the object CONTAIN, which must serialize to
  a JSON object.  If CONTAIN is nil, apply no containment restriction.
  KEYS may be a list of strings being top level keys in the objects of
  model and only the values of said keys will be returned, bundled
  together in a JSON object.  If keys is nil the entire object will be
  returned.  LIMIT, if supplied, must be an integer that represents the
  maximum number of objects that will be returned.  FILTER will be JSON
  serialized by TO-JSON, a function designator for a function of one
  argument.  The returned JSON strings are parsed by the function of one
  argument designated by FROM-JSON.  This is _not_ a prepared query so
  extra care must be taken if KEYS or CONTAIN derive from unsanitized
  user input."
    (let ((filter (if contain (funcall to-json contain) nil)))
      (let ((select `(:select ,(if keys `(jbuild ,keys) 'jdoc)
                      :from ',model
                      :where ,(if filter `(:@> 'jdoc ,filter) "t"))))
        (let ((query (if (integerp limit) `(:limit ,select ,limit) select)))
  
negative.code:     (keys$ model)))
  
  (defun tally (model)
    "Return a count of JSON documents in MODEL, a symbol."
    (log:trace "Call tally on ~A" model)
    (ensure-model-query model 'tally$)
    (ensure-transaction-level (count read-committed-ro)
  