bento_meta.util.cypher.entities

bento_meta.util.cypher.entities

Representations of cypher nodes, relationships, properties, paths

Module Contents

Classes

Entity

A property graph Entity. Base class.

N

A property graph Node.

R

A property graph Relationship or edge.

VarLenR

Variable length property graph Relationship or edge.

N0

Completely anonymous node ().

R0

Completely anonymous relationship -[]-, i.e. --

P

A property graph Property.

T

A property graph Triple; i.e., (n)-[r]->(m).

NoDirT

A directionless property graph Triple; i.e., (n)-[r]-(m).

G

A property graph Path.

Functions

countmaker([max])

_as(ent, alias)

Return copy of ent with As alias set.

_plain(ent)

Return entity without properties.

_anon(ent)

Return entity without variable name.

_var(ent)

Return entity without label or type.

_plain_var(ent)

Return entity with only the variable, no label or properties

_pattern(ent)

_condition(ent)

_return(ent)

bento_meta.util.cypher.entities.countmaker(max=10000)[source]
class bento_meta.util.cypher.entities.Entity[source]

Bases: object

A property graph Entity. Base class.

classmethod _reset_counter()[source]
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

_add_props(props)[source]
class bento_meta.util.cypher.entities.N(label=None, props=None, As=None)[source]

Bases: Entity

A property graph Node.

count
relate_to(r, n)[source]
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.R(Type=None, props=None, As=None, _dir='_right')[source]

Bases: Entity

A property graph Relationship or edge.

count
relate(n, m)[source]
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.VarLenR(min_len: int = -1, max_len: int = -1, Type=None, props=None, As=None, _dir='_right')[source]

Bases: R

Variable length property graph Relationship or edge.

pattern()[source]

Render entity as a match pattern.

class bento_meta.util.cypher.entities.N0[source]

Bases: N

Completely anonymous node ().

pattern()[source]

Render entity as a match pattern.

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.R0[source]

Bases: R

Completely anonymous relationship -[]-, i.e. –

pattern()[source]

Render entity as a match pattern.

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.P(handle, value=None, As=None)[source]

Bases: Entity

A property graph Property.

count
parameterize = False
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.T(n, r, m)[source]

Bases: Entity

A property graph Triple; i.e., (n)-[r]->(m).

count
nodes()[source]
edge()[source]
edges()[source]
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

class bento_meta.util.cypher.entities.NoDirT(*args)[source]

Bases: T

A directionless property graph Triple; i.e., (n)-[r]-(m).

pattern()[source]

Render entity as a match pattern.

nodes()[source]
edge()[source]
edges()[source]
class bento_meta.util.cypher.entities.G(*args)[source]

Bases: Entity

A property graph Path. Defined as an ordered set of partially overlapping triples.

count
_create_path(args)[source]
_append(ent)[source]
nodes()[source]
edges()[source]
pattern()[source]

Render entity as a match pattern.

condition()[source]

Render entity as a condition (for WHERE, e.g.).

Return()[source]

Render entity as a return value.

bento_meta.util.cypher.entities._as(ent, alias)[source]

Return copy of ent with As alias set.

bento_meta.util.cypher.entities._plain(ent)[source]

Return entity without properties.

bento_meta.util.cypher.entities._anon(ent)[source]

Return entity without variable name.

bento_meta.util.cypher.entities._var(ent)[source]

Return entity without label or type.

bento_meta.util.cypher.entities._plain_var(ent)[source]

Return entity with only the variable, no label or properties

bento_meta.util.cypher.entities._pattern(ent)[source]
bento_meta.util.cypher.entities._condition(ent)[source]
bento_meta.util.cypher.entities._return(ent)[source]