Browse Source

Remove revision from document

I believe it is harmful because my structures represent entity
references which are stable whereas the revision is unstable.
tags/v0.8.0
Damien Cassou 2 years ago
parent
commit
37b4e1125d
No known key found for this signature in database GPG Key ID: A7123815F5DCE914
2 changed files with 2 additions and 8 deletions
  1. +0
    -6
      libelcouch.el
  2. +2
    -2
      test/libelcouch-test.el

+ 0
- 6
libelcouch.el View File

@@ -75,7 +75,6 @@ considered to have failed."
(:include libelcouch-named-entity)
(:constructor libelcouch--document-create)
(:conc-name libelcouch--document-))
(revision nil :read-only t)
(database nil :read-only t))

@@ -124,10 +123,6 @@ considered to have failed."
(cl-defmethod libelcouch-entity-url ((instance libelcouch-instance))
(libelcouch--instance-url instance))

(defun libelcouch-document-revision (document)
"Return the revision of DOCUMENT as a string."
(libelcouch--document-revision document))

;;; Private helpers

@@ -144,7 +139,6 @@ considered to have failed."
(mapcar
(lambda (document-json) (libelcouch--document-create
:name (map-elt document-json 'id)
:revision (map-nested-elt document-json '(value rev))
:database database))
documents-json)))



+ 2
- 2
test/libelcouch-test.el View File

@@ -83,8 +83,8 @@
(should (equal
children
(list
(libelcouch--document-create :name "doc1" :revision "rev1" :database database)
(libelcouch--document-create :name "doc2" :revision "rev2" :database database))))))
(libelcouch--document-create :name "doc1" :database database)
(libelcouch--document-create :name "doc2" :database database))))))

(ert-deftest libelcouch--entity-children-url ()
(let* ((instance (libelcouch--instance-create :name "Instance" :url "http://localhost:5984"))


Loading…
Cancel
Save