lisp123456

Untitled

Oct 8th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. (defclass book-custom-indices (bknr.datastore:store-object)
  2. ((author :accessor book-author
  3. :initarg :author
  4. :index-type bknr.indices:hash-index
  5. :index-initargs (:test #'equal)
  6. :index-reader books-with-author
  7. :index-values all-authors)
  8. (title :accessor book-title
  9. :initarg :title
  10. :index-type bknr.indices:unique-index
  11. :index-initargs (:test #'equal)
  12. :index-reader book-with-title
  13. :index-values all-titles)
  14. (book-id :accessor book-id
  15. :initarg :book-id
  16. :index-type bknr.indices:unique-index
  17. :index-initargs (:test #'equal)
  18. :index-reader book-with-bci-id
  19. :index-values all-book-ids
  20. :index-mapvalues with-book-ids)
  21. (subject :accessor book-subject
  22. :initarg :subject
  23. :index-type bknr.indices:hash-list-index
  24. :index-initargs (:test #'equal)
  25. :index-reader books-with-subject
  26. :index-values all-subjects))
  27. (:metaclass bknr.datastore:persistent-class))
Advertisement
Add Comment
Please, Sign In to add comment