labapi.util.types.InsertBehavior#

class labapi.util.types.InsertBehavior(
value,
names=<not given>,
*values,
module=None,
qualname=None,
type=None,
start=1,
boundary=None,
)[source]#

Bases: Enum

Enumeration of behaviors when inserting a node that already exists.

__init__(*args, **kwds)#

Attributes

Replace

Delete the existing node(s) and create a new one.

Ignore

Just create a new node anyways.

Retain

Keep the existing node and return it.

Raise

Raise NodeExistsError if the node already exists.

Replace = 0#

Delete the existing node(s) and create a new one.

Ignore = 1#

Just create a new node anyways.

Retain = 2#

Keep the existing node and return it.

Raise = 3#

Raise NodeExistsError if the node already exists.