Module trase.tools.pcs.traders.insert

Functions that insert traders data into the database.

Functions

def insert_trader_entity(name, country_id=None, autocommit=True, cnx=None, cur=None)
def insert_trader_group(name, autocommit=True, cnx=None, cur=None)
def insert_trader_label(name, autocommit=True, cnx=None, cur=None)
def insert_trader_tree_if_missing(name, trase_id=None, autocommit=True, force=False, cnx=None, cur=None)

Return nodes.id of trader label with provided name. If no label is found, a new trader hierarchy with that name is created.

Raises

ValueError
if a Trase ID is provided and a node (of any kind) with that Trase ID already exists