|
|
@ -7,8 +7,7 @@
|
|
|
|
(spec/def ::updated-at ::neo4j/date-str)
|
|
|
|
(spec/def ::updated-at ::neo4j/date-str)
|
|
|
|
(spec/def ::name (spec/and (complement empty?) string?))
|
|
|
|
(spec/def ::name (spec/and (complement empty?) string?))
|
|
|
|
|
|
|
|
|
|
|
|
(neo4j/defquery
|
|
|
|
(neo4j/defquery findy-by-schema
|
|
|
|
findy-by-schema
|
|
|
|
|
|
|
|
"MATCH (i:instance)-[:of]->(s:schema)
|
|
|
|
"MATCH (i:instance)-[:of]->(s:schema)
|
|
|
|
WHERE s.uuid = {uuid}
|
|
|
|
WHERE s.uuid = {uuid}
|
|
|
|
RETURN i
|
|
|
|
RETURN i
|
|
|
@ -77,14 +76,3 @@
|
|
|
|
(:a %))
|
|
|
|
(:a %))
|
|
|
|
(neo4j/exec-query! find-properties
|
|
|
|
(neo4j/exec-query! find-properties
|
|
|
|
{:uuid uuid})))
|
|
|
|
{:uuid uuid})))
|
|
|
|
|
|
|
|
|
|
|
|
(neo4j/defquery schema-of
|
|
|
|
|
|
|
|
"MATCH (i:instance {uuid:{uuid}}),
|
|
|
|
|
|
|
|
(i)-[:of]->(s:schema)
|
|
|
|
|
|
|
|
RETURN s")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defn schema-of [uuid]
|
|
|
|
|
|
|
|
(-> (neo4j/exec-query! schema-of
|
|
|
|
|
|
|
|
{:uuid uuid})
|
|
|
|
|
|
|
|
first
|
|
|
|
|
|
|
|
(map :s)))
|
|
|
|
|
|
|
|