Created
February 26, 2013 16:42
-
-
Save dcolish/5039976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro write-builder [cube & ats] | |
`(loop [builder# (WriteBuilder. ~cube) | |
ats# ~@ats] | |
(cond | |
(empty? ats#) builder# | |
:else (do | |
(recur (.at builder# (first ats#)) (rest ats#)))))) | |
(write-builder cube [[time (now)]]) | |
results in | |
xi:datablock (1) $ lein run | |
Exception in thread "main" java.lang.IllegalArgumentException: No matching method found: at for class com.urbanairship.datacube.WriteBuilder | |
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:53) | |
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) | |
at datablock.core$_main.doInvoke(core.clj:58) | |
at clojure.lang.RestFn.invoke(RestFn.java:397) | |
at clojure.lang.Var.invoke(Var.java:411) | |
at user$eval619.invoke(NO_SOURCE_FILE:1) | |
at clojure.lang.Compiler.eval(Compiler.java:6511) | |
at clojure.lang.Compiler.eval(Compiler.java:6501) | |
at clojure.lang.Compiler.eval(Compiler.java:6477) | |
at clojure.core$eval.invoke(core.clj:2797) | |
at clojure.main$eval_opt.invoke(main.clj:297) | |
at clojure.main$initialize.invoke(main.clj:316) | |
at clojure.main$null_opt.invoke(main.clj:349) | |
at clojure.main$main.doInvoke(main.clj:427) | |
at clojure.lang.RestFn.invoke(RestFn.java:421) | |
at clojure.lang.Var.invoke(Var.java:419) | |
at clojure.lang.AFn.applyToHelper(AFn.java:163) | |
at clojure.lang.Var.applyTo(Var.java:532) | |
at clojure.main.main(main.java:37) | |
xi:datablock (1) $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The WriteBuilder class does have an at method.
https://github.com/urbanairship/datacube/blob/master/src/main/java/com/urbanairship/datacube/WriteBuilder.java