nodeIsLeaf method
Check if a Node has at least one Relation to it, but none from it.
Implementation
@override
bool nodeIsLeaf(String nodeId) {
final hasIncoming = _select(
'relations',
where: 'toNodeId = ?',
whereArgs: [nodeId],
).isNotEmpty;
final hasOutgoing = _select(
'relations',
where: 'fromNodeId = ?',
whereArgs: [nodeId],
).isNotEmpty;
return hasIncoming && !hasOutgoing;
}