code: func (s *Session) Commit() error {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  
  	if err := s.writeRequest(mtCommit, false); err != nil {
  		return err
  	}
  
  	if err := s.readReply(nil); err != nil {
  		return err
  	}
  
  	if trace {
  		outLogger.Printf("transaction flags: %s", s.txFlags)
  	}
  
  	s.conn.inTx = false
  	return nil
  }
docs: // Commit executes a database commit.