|  |  |  | @ -65,16 +65,18 @@ | 
		
	
		
			
				|  |  |  |  |      SET p.value = {value}, | 
		
	
		
			
				|  |  |  |  |          p.created_at = {created_at}, | 
		
	
		
			
				|  |  |  |  |          p.updated_at = {updated_at}") | 
		
	
		
			
				|  |  |  |  | (defn create! [user-uuid schema-uuid instance] | 
		
	
		
			
				|  |  |  |  | (defn create! [user-uuid | 
		
	
		
			
				|  |  |  |  |                schema-uuid | 
		
	
		
			
				|  |  |  |  |                {:keys [name properties]}] | 
		
	
		
			
				|  |  |  |  |   (let [instance-uuid (neo4j/uuid) | 
		
	
		
			
				|  |  |  |  |         now (neo4j/now-str) | 
		
	
		
			
				|  |  |  |  |         instance-tuple [create-instance | 
		
	
		
			
				|  |  |  |  |                         {:schema_uuid schema-uuid | 
		
	
		
			
				|  |  |  |  |                          :name (:name instance) | 
		
	
		
			
				|  |  |  |  |                          :name name | 
		
	
		
			
				|  |  |  |  |                          :uuid instance-uuid | 
		
	
		
			
				|  |  |  |  |                          :created_at now | 
		
	
		
			
				|  |  |  |  |                          :user_uuid user-uuid}] | 
		
	
		
			
				|  |  |  |  |         prop-tuples (for [{:keys [attribute value]} (:properties instance)] | 
		
	
		
			
				|  |  |  |  |         prop-tuples (for [{:keys [attribute value]} properties] | 
		
	
		
			
				|  |  |  |  |                       [create-property | 
		
	
		
			
				|  |  |  |  |                        {:uuid instance-uuid | 
		
	
		
			
				|  |  |  |  |                         :attr_uuid (:uuid attribute) | 
		
	
	
		
			
				
					|  |  |  | 
 |