Class

cnRelationServices

cnRelationServices(ctx)

Relation Services
Uses the infohub GOM (Generic Object Model)

Constructor

# new cnRelationServices(ctx)

Parameters:
Name Type Description
ctx Context

Infohub Context

Since:
  • 08.2025, jh

View Source gom/cnRelation.js, line 89

Classes

cnRelationServices

Methods

# async createRelation(left_nodeid, relation_data, cb) → {Promise.<ApiResponse>}

Parameters:
Name Type Description
left_nodeid *
relation_data *
cb *

View Source gom/cnRelation.js, line 111

Returns the created relation

Promise.<ApiResponse>

# async deleteRelation(relation_sid, cb) → {Promise.<RestResponse>}

Parameters:
Name Type Description
relation_sid *
cb *

View Source gom/cnRelation.js, line 305

Returns the response from the delete operation

Promise.<RestResponse>

# async getRelation(left_nodeid, relation_name, cb)

Get relation by name or create it if it does not exist by using relation_data

Parameters:
Name Type Description
left_nodeid *
relation_name *
cb *

View Source gom/cnRelation.js, line 158

# async getRelationList(query, cb) → {Promise.<ApiResponse>}

Parameters:
Name Type Description
query *

= { 'members' : ' ... ' 'filter' : ' ... ' }

cb *

View Source gom/cnRelation.js, line 392

Returns array of relations

Promise.<ApiResponse>

# async getRelationListByNode(left_nodeid, query, cb) → {Promise.<ApiResponse>}

Parameters:
Name Type Description
left_nodeid *
query *
cb *

View Source gom/cnRelation.js, line 330

{ status : data : array of relations

Promise.<ApiResponse>