   ([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))




    table))


(defn -dirty?
  "Internal `dirty?` implementation."
  [^Table table]
  (.dirty table))


(defn- flush-changes
  "Returns a vector containing a link to a patch tablet and an index tree."
  [^Table table full?]
