anchor.diff:  (in-package :cldm-registry.model)
  +
   
   (defun create-library (&key name
   			 description
  
positive.code:   (let ((repo (make-document)))
      (add-element "name" (cldm::name repository) repo)
      (add-element "address" (cldm::unparse (cldm::repository-address repository)))
      repo))				 
  			 
  
negative.code: (defun find-library-by-name (name)
    (first (docs (db.find "libraries" (kv "name" name)))))
  
  (defun library-uuid (library)
    (get-element "uuid" library))
  
  (defun library-version-version (library-version)
    (cldm::read-version-from-string (get-element "version" library-version)))
  
  (defun library-versions (library)
    (let ((versions
  	 (docs (db.find "versions" (kv "libraryuuid" (library-uuid library))))))
      (sort versions
  	  #'semver:version<
  	  :key #'library-version-version)))
  
  (defun create-library-version (&key library
  				 version
  				 repositories)
  