 (ns org.altlaw.db.docids
   (:require [org.altlaw.util.simpledb :as db]))
+
+;;; PRIVATE
 
 (def #^{:private true} *domain* "Docids")
 

                {:collection collection
                 :key key
                 ;; Add leading zeros for lexicographic ordering
                 :docid (format "%09d" docid)}))

(defn delete-docid [collection key]
  (db/delete-item *domain* (make-db-key collection key)))


    ;; Ensure the key fits within SimpleDB's 1024-byte limit
    (if (< (count s) 1024)
      s (subs s 0 1024))))

(def #^{:private true} *number-format* "%09d")

(def #^{:private true} *base-number-string*
     (format *number-format* 10000))

;;; PUBLIC

(defn get-docid [collection key]
  (when-let [string (get (db/get-attrs *domain*
