anchor.diff:    version)
   
   (defun create-dstream (dstream-type)
  -  (postmodern:query (:select 'dstream-uuid
  -                             'dstream-type
  -                             'dstream-type-key
  -                             'version
  -                     :from (:destore.create-dstream '$1 '$2))
  -                    (genuuid)
  -                    dstream-type
  -                    :dstream))
  +  (with-serializable-isolation
  +      (postmodern:query (:select 'dstream-uuid
  +                                 'dstream-type
  +                                 'dstream-type-key
  +                                 'version
  +                                 :from (:destore.create-dstream '$1 '$2))
  +                        (genuuid)
  +                        dstream-type
  +                        :dstream)))
   
   (postmodern:defprepared list-all-dstreams
       (:select 'dstream-uuid
  
positive.code:       :null
        x))
  
  (postmodernity:defpgstruct dstream
    uuid
    type
  
negative.code:                      devent-type
                       metadata
                       payload)
    (with-serializable-isolation
        (postmodern:query (:select (:destore.write-devent
                                    '$1 '$2 '$3 '$4 '$5 '$6 '$7))
                          (dstream-uuid dstream)
                          (as-db-null dstream-type-key)
                          expected-version
                          (genuuid)
                          devent-type
                          metadata
                          payload
                          :single)))
  
  (postmodernity:defpgstruct devent
    uuid
  