diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-03-30 20:32:05 +0300 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-04-01 22:25:54 +0300 |
| commit | 01fe4a01f925d47f8efd2e5c5912f3b89cf9548e (patch) | |
| tree | 161be4d8931c20d4f80428cf9cc7635e0ddc3404 /src/server/neo4j_util.py | |
| parent | 297c8a34c78c3d66ef3ea0fa3f41789525c71bb4 (diff) | |
neo4j_util: quote__backtick(), quote__singlequote()
Diffstat (limited to 'src/server/neo4j_util.py')
| -rw-r--r-- | src/server/neo4j_util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/neo4j_util.py b/src/server/neo4j_util.py index 44ead256..60c3a445 100644 --- a/src/server/neo4j_util.py +++ b/src/server/neo4j_util.py @@ -301,6 +301,18 @@ def post(url, data): return ret +def quote__backtick(label): + """ + quote label (possibly containing spaces) with backticks + """ + return tok__quote__backquote + label + tok__quote__backquote + +def quote__singlequote(label): + """ + quote label (possibly containing spaces) with single quotes + """ + return tok__quote__singlequote + label + tok__quote__singlequote + def validate_label(label): assert len(label) > 0 and (label[0].isupper() or label[0] == '_'), 'malformed label: ' + label pass |
