Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Adding :n-serializer to delete-columns #36

merged 1 commit into from

2 participants


This allows you to override the :n-serializer in delete-columns when necessary.

As far as I can tell, the type inferring serializer doesn't work when deleting composite columns.

@pingles pingles merged commit f73e45e into pingles:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 11, 2012
  1. @ryfow
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 4 deletions.
  1. +5 −3 src/clj_hector/core.clj
  2. +4 −1 test/clj_hector/test/core.clj
8 src/clj_hector/core.clj
@@ -340,9 +340,11 @@
(defn delete-columns
"Deletes columns identified in cs for row pk."
- [ks cf pk cs]
- (let [mut (HFactory/createMutator ks type-inferring)]
- (doseq [c cs] (.addDeletion mut pk cf c type-inferring))
+ [ks cf pk cs & o]
+ (let [mut (HFactory/createMutator ks type-inferring)
+ opts (apply hash-map o)
+ serializer (s/serializer (or (:n-serializer opts) type-inferring))]
+ (doseq [c cs] (.addDeletion mut pk cf c serializer))
(.execute mut)))
(defn delete-super-columns
5 test/clj_hector/test/core.clj
@@ -26,7 +26,10 @@
(is (= [{"row-key" {["col" "name"] "v"}}]
(apply get-rows keyspace column-family ["row-key"] opts))
(= {["col" "name"] "v"}
- (apply get-columns keyspace column-family "row-key" [comp] opts))))))))
+ (apply get-columns keyspace column-family "row-key" [comp] opts)))
+ (is
+ (instance? me.prettyprint.hector.api.mutation.MutationResult
+ (delete-columns keyspace column-family "row-key" [comp] :n-serializer :composite))))))))
(deftest serializers
(let [column-family "A"]
Something went wrong with that request. Please try again.