|
|
|
@ -12,13 +12,15 @@
|
|
|
|
|
findy-by-schema
|
|
|
|
|
{:uuid schema-uuid})))
|
|
|
|
|
|
|
|
|
|
(neo4j/defquery with-name
|
|
|
|
|
"MATCH (a:attribute)
|
|
|
|
|
(neo4j/defquery with-name-in-schema
|
|
|
|
|
"MATCH (a:attribute)-[:of]->(s:schema)
|
|
|
|
|
WHERE a.name = {name}
|
|
|
|
|
AND s.uuid = {schema_uuid}
|
|
|
|
|
RETURN a")
|
|
|
|
|
(defn with-name! [matching-name]
|
|
|
|
|
(-> (neo4j/exec-query! with-name
|
|
|
|
|
{:name matching-name})
|
|
|
|
|
(defn with-name-in-schema! [matching-name schema-uuid]
|
|
|
|
|
(-> (neo4j/exec-query! with-name-in-schema
|
|
|
|
|
{:name matching-name
|
|
|
|
|
:schema_uuid schema-uuid})
|
|
|
|
|
first
|
|
|
|
|
:a))
|
|
|
|
|
|
|
|
|
|