original_docstring: 
      Update the admin rights for the given user.
      :param db: The db session to use.
      :param user: The name of the user to update.
      :param admin: The new value for the admin rights for the user.
      :return: None.
      
docstring: Update the admin rights for the given user.
docstring_tokens: Update the admin rights for the given user .
code: def update_admin(db: Session, user: str, admin: bool):
      """
      Update the admin rights for the given user.
      :param db: The db session to use.
      :param user: The name of the user to update.
      :param admin: The new value for the admin rights for the user.
      :return: None.
      """
      db.query(models.User)\
          .filter(models.User.name == user)\
          .update({models.User.admin: admin}, synchronize_session=False)
      db.commit()
code_tokens: def update_admin ( db : Session , user : str , admin : bool ) : db . query ( models . User ) . filter ( models . User . name == user ) . update ( { models . User . admin : admin } , synchronize_session = False ) db . commit ( )
short_docstring: Update the admin rights for the given user.
short_docstring_tokens: Update the admin rights for the given user .
comment: """
      Update the admin rights for the given user.
      :param db: The db session to use.
      :param user: The name of the user to update.
      :param admin: The new value for the admin rights for the user.
      :return: None.
      """