SQLBOX_ROLE_HIER_CHILD(3)

NAME
sqlbox_role_hier_child - add a child to a role

LIBRARY
sqlbox

SYNOPSIS
#include <stdint.h>
#include <sqlbox.h>
int
sqlbox_role_hier_child(struct sqlbox_role_hier *p, size_t parent, size_t child);

DESCRIPTION
Set parent to be the parent of role child in the hierarchy generator p. In the hierarchical structure created by sqlbox_role_hier_child(), a node may have at most one parent.

RETURN VALUES
Returns zero if child or parent is an invalid role, if child already has a parent set, if either child or parent are a sink or start role, or if child is already an ancestor to parent. Returns non-zero otherwise.

SEE ALSO
sqlbox_role_hier_alloc(3)