           sqlv  [sql eid txid value]]
       (sc/execute conn sqlv))))
 
-(deftype RetractOperation [partition attr value]
+(deftype RetractOperation [partition eid attr value]
   IOperation
   (-execute [_ conn txid]
     (let [table (attrs/-normalized-name attr partition)

(defprotocol IOperation
  (-execute [_ conn txid] "Execute the operation."))

(deftype AddOperation [partition attr value]
  IOperation
  (-execute [_ conn txid]
    (let [table (attrs/-normalized-name attr partition)

    ;; TODO: exclusive share lock
    (func conn)))

(defn transact
  [context facts]
  (let [ops (compile-ops context "user" facts)
        conn (.-connection context)]
    (run-in-tx conn #(run-tx % ops))))
