QueryBuilder Classes¶
-
class
neoalchemy.cypher.SimpleQuery¶ Parent class to
Create,Match, andMerge.-
params¶ A dict mapping query parameter names to their current values.
-
__str__()¶ Return the underlying Cypher query, which has been automatically parametrized.
-
delete(args=None, detach=False)¶ Set the
DELETEclause for the query.
Parameters: - args – See the docs for Return.
- detach (bool) – If set,
DETACH DELETEinstead.
Returns: The object itself, to support Chaining.
-
limit(n)¶ Set the
LIMITclause for the query.
Parameters: n (int) – The argument to LIMIT-
order_by(args, desc=False)¶ Set the
ORDER BYclause for the query.
Parameters: - args – See the docs for Return.
- desc (bool) – If set, sort
DESC. Otherwise, sortASC.
-
remove(args=None)¶ Set the
REMOVEclause for the query.
Parameters: args – See the docs for Return. Returns: The object itself, to support Chaining. -
return_(args=None, distinct=False)¶ Set the
RETURNclause for the query.
Parameters: - args – See the docs for Return.
- distinct (bool) – If set,
RETURN DISTINCTinstead.
Returns: The object itself, to support Chaining.
-
set(property, value)¶ Set a property to a value. Can be called multiple times.
Parameters: - property (Property) – The property to set
- value (any) – The value of the property to set
Returns: The object itself, to support Chaining.
-
skip(n)¶ Set the
SKIPclause for the query.
Parameters: n (int) – The argument to SKIP-
where(exprs, or_=False)¶ Set the
WHEREclause for the query.
Parameters: - exprs (CypherExpression) – See the docs for Where
- or_ (bool) – If set, this will be joined with the preceding
WHEREclause usingORinstead ofAND.
Returns: The object itself, to support Chaining.
-
-
class
neoalchemy.cypher.Create(obj)¶ Parameters: obj (GraphObject) – The GraphObjectto create.
-
class
neoalchemy.cypher.Match(obj, optional=False)¶ Parameters: - obj (GraphObject) – The
GraphObjectto match. - optional (bool) – If set,
OPTIONAL MATCHinstead.
- obj (GraphObject) – The
-
class
neoalchemy.cypher.Merge(obj)¶ Parameters: obj (GraphObject) – The GraphObjectto merge.