def get_child_ids(cur, node):
    """
    Return an iterator that yields the ID of every immediate child.

    :param node:
    :type node: Node or uuid4
    """
    sql = """
        SELECT
          id
        FROM
          nodes
        WHERE
          parent=%s
        ORDER BY
          position;
    """
    cur.execute(sql, (str(node),))
    for result in cur:
        yield str(result['id'])
