diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-10-07 18:08:20 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-10-07 18:08:20 +0200 |
| commit | 4717f01ed33b26f6c0fbbf2cb83fbf681d14da41 (patch) | |
| tree | c2ef5f0ffa81fddfadac09e68c4567c878ac4093 /src-py/neo4j_util.py | |
| parent | fedc3cc0e2dd27ffaec53867f00b1db255378b3f (diff) | |
mv type sanity checks to neo4j_util
Diffstat (limited to 'src-py/neo4j_util.py')
| -rw-r--r-- | src-py/neo4j_util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src-py/neo4j_util.py b/src-py/neo4j_util.py index c340e15a..2d870fcc 100644 --- a/src-py/neo4j_util.py +++ b/src-py/neo4j_util.py @@ -69,3 +69,15 @@ def where_clause_from_filter_attr_map(filter_attr_map, node_param_name="n"): filter_str = "where {0}".format(' and '.join(filter_arr)) return filter_str +def __type_check_link(link): + assert link.has_key('__src') + assert link.has_key('__dst') + +def __type_check_filter_attr_map(filter_attr_map): + """ + # type sanity check an attribute filter map + """ + assert isinstance(filter_attr_map, dict) + for k, v in filter_attr_map.items(): + assert isinstance(k, basestring) + assert isinstance(v, list) |
