Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated docs, better rendering

  • Loading branch information...
commit ec6ad16598fa00a3bbdf01eebf770ae1f2ac0f59 1 parent 1f3c5ac
Michael Hunger authored

Showing 2 changed files with 12 additions and 6 deletions. Show diff stats Hide diff stats

  1. +5 4 README.md
  2. +7 2 src/trycypher/models/cypher.clj
9 README.md
Source Rendered
... ... @@ -1,16 +1,17 @@
1   -# trycypher
  1 +# Try Cypher
2 2
3   -TryClojure is a online Clojure REPL written using Noir and Chris Done's jquery console (you're awesome, Chris).
  3 +TryCypher is a online Neo4j Cypher REPL und Tutorial written using TryClojure, Noir and Chris Done's jquery console.
4 4
5 5 ## Usage
6 6
7   -http://tryclj.com
  7 +http://trycypher.heroku.com
8 8
9   -If you want to run it, refer to https://github.com/Raynes/trycypher/wiki/Running-Tryclojure
  9 +If you want to run it, refer to https://github.com/Raynes/tryclojure/wiki/Running-Tryclojure
10 10
11 11 ## Credits
12 12
13 13 apgwoz: Design
  14 +Raynes: TryClojure
14 15
15 16 ## License
16 17
9 src/trycypher/models/cypher.clj
@@ -12,9 +12,9 @@
12 12 )
13 13
14 14 (defn cypher-convert-cell [[col value]]
15   - [col (cypher-convert-value value)])
  15 + [col (render (cypher-convert-value value))])
16 16
17   -(defn cypher-convert-row [row] (map cypher-convert-value row))
  17 +(defn cypher-convert-row [row] (map #(render (cypher-convert-value %)) row))
18 18
19 19 (defn cypher-convert-result [row] (map cypher-convert-cell row))
20 20
@@ -23,6 +23,11 @@
23 23 ([row] (pad row "|" "\n"))
24 24 )
25 25
  26 +(defn render [value]
  27 + (if (coll? value) (doall (flatten (seq value))) value)
  28 +)
  29 +
  30 +
26 31 (defn result-to-table [{data :data columns :columns}]
27 32 (str (pad columns) (apply str (map pad (map cypher-convert-row data)))))
28 33

0 comments on commit ec6ad16

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