Source
(defmethod class-index-table ((rucksack standard-rucksack))
;; Create class-index-table if it doesn't exist yet.
(flet ((do-it ()
(unless (slot-boundp rucksack 'class-index-table)
;; Create a btree mapping class names to class
;; indexes.
(let ((btree (make-instance 'btree
:rucksack rucksack
:key< 'string<
:value= 'p-eql
:unique-keys-p t
:dont-index t)))
(setf (slot-value rucksack 'class-index-table) (object-id btree)
(roots-changed-p rucksack) t)))
(cache-get-object (slot-value rucksack 'class-index-table)
(rucksack-cache rucksack))))
(if (current-transaction)
(do-it)
(with-transaction (:rucksack rucksack)
(do-it)))))
Source Context