4
Cypher 코드를 형식화하기위한 방법/웹 사이트/승화 플러그인 등은 있습니까 (정렬 및 정리)? 이 사이트와 동일 neo4j Cypher 코드 포맷 수행 방법
예를 들어 자바 스크립트를하고있다 : 완벽하지, 여기에 내가 무엇을하고있는 동안 http://jsbeautifier.org/Cypher 코드를 형식화하기위한 방법/웹 사이트/승화 플러그인 등은 있습니까 (정렬 및 정리)? 이 사이트와 동일 neo4j Cypher 코드 포맷 수행 방법
예를 들어 자바 스크립트를하고있다 : 완벽하지, 여기에 내가 무엇을하고있는 동안 http://jsbeautifier.org/.
var Cypher = document.body.innerText
Cypher = Cypher.replace(/(?:\s*(OPTIONAL MATCH|MATCH|WHERE|WITH|RETURN|DETACH DELETE|DELETE|UNWIND|CASE)\s*)/gi, function(match) {
return '\n' + match.toUpperCase() + ' '
});
Cypher = Cypher.replace(/(?:\s*(AND|NOT|DISTINCT)\s*)/gi, function(match) {
return ' ' + match.toUpperCase().trim() + ' '
});
Cypher = Cypher.replace(/(?:\s*(\w+)\(\s*)/gi, function(match) {
return ' ' + match.toUpperCase().trim()
});
document.body.innerText = Cypher
match (n), (n)--(m) where n.car=1 and not n.id="rawr" with n.name return collect(n) as cars
(JSFiddle version)을 (잘하면 다른 사람은 뛰어 그것을 개선)