Skip to content
Browse files

updated docs, better rendering

  • Loading branch information...
1 parent 1f3c5ac commit ec6ad16598fa00a3bbdf01eebf770ae1f2ac0f59 @jexp committed Jul 4, 2012
Showing with 12 additions and 6 deletions.
  1. +5 −4 README.md
  2. +7 −2 src/trycypher/models/cypher.clj
View
9 README.md
@@ -1,16 +1,17 @@
-# trycypher
+# Try Cypher
-TryClojure is a online Clojure REPL written using Noir and Chris Done's jquery console (you're awesome, Chris).
+TryCypher is a online Neo4j Cypher REPL und Tutorial written using TryClojure, Noir and Chris Done's jquery console.
## Usage
-http://tryclj.com
+http://trycypher.heroku.com
-If you want to run it, refer to https://github.com/Raynes/trycypher/wiki/Running-Tryclojure
+If you want to run it, refer to https://github.com/Raynes/tryclojure/wiki/Running-Tryclojure
## Credits
apgwoz: Design
+Raynes: TryClojure
## License
View
9 src/trycypher/models/cypher.clj
@@ -12,9 +12,9 @@
)
(defn cypher-convert-cell [[col value]]
- [col (cypher-convert-value value)])
+ [col (render (cypher-convert-value value))])
-(defn cypher-convert-row [row] (map cypher-convert-value row))
+(defn cypher-convert-row [row] (map #(render (cypher-convert-value %)) row))
(defn cypher-convert-result [row] (map cypher-convert-cell row))
@@ -23,6 +23,11 @@
([row] (pad row "|" "\n"))
)
+(defn render [value]
+ (if (coll? value) (doall (flatten (seq value))) value)
+)
+
+
(defn result-to-table [{data :data columns :columns}]
(str (pad columns) (apply str (map pad (map cypher-convert-row data)))))

0 comments on commit ec6ad16

Please sign in to comment.
Something went wrong with that request. Please try again.