parameters: (parent_id, max_nodes:int = 5000)
return_statement: return child_nodes
docstring: Returns all children of a node with id <parent_id>. The result
      is limited to a maximum ef <max_nodes> nodes.
docstring_summary: Returns all children of a node with id <parent_id>. The result
      is limited to a maximum ef <max_nodes> nodes.
docstring_tokens: Returns all children of a node with id <parent_id > . The result is limited to a maximum ef <max_nodes > nodes .
function: def get_children(parent_id, max_nodes:int = 5000):
      """ Returns all children of a node with id <parent_id>. The result
      is limited to a maximum ef <max_nodes> nodes.
      """
      c = connection.cursor()
      # Must select the user as well because the user who created the skeleton may be differen
      # than the user who puts the request for the listing in the Object Tree.
      c.execute('''
              SELECT c.id,
                     c.class_name,
                     "auth_user".username AS username
              FROM class AS c
                  INNER JOIN class_class AS cc
                  ON c.id = cc.class_a
                  INNER JOIN "auth_user"
                  ON c.user_id = "auth_user".id
              WHERE cc.class_b = %s
              ORDER BY c.id ASC
              LIMIT %s''', (
          parent_id,
          max_nodes))
  
      # Collect all child node class instances
      child_nodes = []
      for row in c.fetchall():
          child = ClassElement(row[0], row[1])
          child_nodes.append( child )
  
      return child_nodes
function_tokens: def get_children ( parent_id , max_nodes : int = 5000 ) : c = connection . cursor ( ) # Must select the user as well because the user who created the skeleton may be differen # than the user who puts the request for the listing in the Object Tree. c . execute ( '''
              SELECT c.id,
                     c.class_name,
                     "auth_user".username AS username
              FROM class AS c
                  INNER JOIN class_class AS cc
                  ON c.id = cc.class_a
                  INNER JOIN "auth_user"
                  ON c.user_id = "auth_user".id
              WHERE cc.class_b = %s
              ORDER BY c.id ASC
              LIMIT %s''' , ( parent_id , max_nodes ) ) # Collect all child node class instances child_nodes = [ ] for row in c . fetchall ( ) : child = ClassElement ( row [ 0 ] , row [ 1 ] ) child_nodes . append ( child ) return child_nodes