   ([table]
    (-flush! table nil))
   ([^Table table opts]
-   (if (dirty? table)
+   (if (.dirty table)
      (let [[patch-link data-link] (flush-changes table (:apply-patch? opts))
            root-data (-> (.root-data table)
                          (assoc :data/type :merkle-db/table)

        patch'
        true
        (._meta table)))))


; TODO: put this in protocol?
(defn dirty?
  "Return true if the table has local non-persisted modifications."
  [^Table table]
  (.dirty table))




   :read -read
   :insert -insert
   :delete -delete
   :dirty? -dirty?
   :flush! -flush!})



;; ## Utility Functions

(defn table-stats
  "Calculate statistics about the structure of the given table."
