      {:sql/lower-bound n-min
       :sql/upper-bound n-max}]))
 
-
-(defn update-partition [content acked]
-  (dissoc content acked))
-
 (defn inject-partition-keys
   [table-partitioner event lifecycle]
   {:sql/table-partitioner table-partitioner})

    true)

  (write-batch
    [_ {:keys [onyx.core/results onyx.core/task-map sql/pool]} replica _]
    (doseq [msg (mapcat :leaves (:tree results))]
      (jdbc/with-db-transaction
        [conn pool]
        (doseq [row (:rows (:message msg))]
          (jdbc/update! conn (:sql/table task-map) row (sql-dsl/where (:where (:message msg)))))))
    true))

(defn upsert-rows [pipeline-data]

    (if-let [seg (first @rst)]
      (do (vswap! rst rest)
          (vswap! offset inc)
          seg)
      (do (vreset! completed? true)
          nil))))
