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
DELETE
clause for the query.
Parameters: - args – See the docs for Return.
- detach (bool) – If set,
DETACH DELETE
instead.
Returns: The object itself, to support Chaining.
-
limit
(n)¶ Set the
LIMIT
clause for the query.
Parameters: n (int) – The argument to LIMIT
-
order_by
(args, desc=False)¶ Set the
ORDER BY
clause for the query.
Parameters: - args – See the docs for Return.
- desc (bool) – If set, sort
DESC
. Otherwise, sortASC
.
-
remove
(args=None)¶ Set the
REMOVE
clause for the query.
Parameters: args – See the docs for Return. Returns: The object itself, to support Chaining. -
return_
(args=None, distinct=False)¶ Set the
RETURN
clause for the query.
Parameters: - args – See the docs for Return.
- distinct (bool) – If set,
RETURN DISTINCT
instead.
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
SKIP
clause for the query.
Parameters: n (int) – The argument to SKIP
-
where
(exprs, or_=False)¶ Set the
WHERE
clause for the query.
Parameters: - exprs (CypherExpression) – See the docs for Where
- or_ (bool) – If set, this will be joined with the preceding
WHERE
clause usingOR
instead ofAND
.
Returns: The object itself, to support Chaining.
-
-
class
neoalchemy.cypher.
Create
(obj)¶ Parameters: obj (GraphObject) – The GraphObject
to create.
-
class
neoalchemy.cypher.
Match
(obj, optional=False)¶ Parameters: - obj (GraphObject) – The
GraphObject
to match. - optional (bool) – If set,
OPTIONAL MATCH
instead.
- obj (GraphObject) – The
-
class
neoalchemy.cypher.
Merge
(obj)¶ Parameters: obj (GraphObject) – The GraphObject
to merge.