internal/protocol/session.go
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
}
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
}
// Commit executes a database commit.