original_docstring: 
      Commit the page commit to the db.
      :param db: The db session to use.
      :param tid: The tid of the entry in the log to commit.
      :return: None.
      
docstring: Commit the page commit to the db.
docstring_tokens: Commit the page commit to the db .
code: def create_or_update_page(db: Session, tid: int):
      """
      Commit the page commit to the db.
      :param db: The db session to use.
      :param tid: The tid of the entry in the log to commit.
      :return: None.
      """
      db_page = None
      to_commit = get_log(db, tid)
      existing_page = get_page(db, to_commit.name)
      if existing_page:
          db.query(models.Page)\
              .filter(models.Page.name == to_commit.name)\
              .update({models.Page.content: to_commit.content}, synchronize_session=False)
      else:
          db_page = models.Page(name=to_commit.name, content=to_commit.content)
          db.add(db_page)
      db.commit()
      # if db_page:
      #     db.refresh(db_page)
code_tokens: def create_or_update_page ( db : Session , tid : int ) : db_page = None to_commit = get_log ( db , tid ) existing_page = get_page ( db , to_commit . name ) if existing_page : db . query ( models . Page ) . filter ( models . Page . name == to_commit . name ) . update ( { models . Page . content : to_commit . content } , synchronize_session = False ) else : db_page = models . Page ( name = to_commit . name , content = to_commit . content ) db . add ( db_page ) db . commit ( )
short_docstring: Commit the page commit to the db.
short_docstring_tokens: Commit the page commit to the db .
comment: """
      Commit the page commit to the db.
      :param db: The db session to use.
      :param tid: The tid of the entry in the log to commit.
      :return: None.
      """$SEP$# if db_page:$SEP$#     db.refresh(db_page)