Skip to content

将数据库改用为mysql,弃用第三方websocket库,自实现websocket#7

Merged
liangbm3 merged 10 commits into
mainfrom
develop
Sep 1, 2025
Merged

将数据库改用为mysql,弃用第三方websocket库,自实现websocket#7
liangbm3 merged 10 commits into
mainfrom
develop

Conversation

@liangbm3

@liangbm3 liangbm3 commented Sep 1, 2025

Copy link
Copy Markdown
Owner

No description provided.

@liangbm3 liangbm3 requested a review from Copilot September 1, 2025 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the database from SQLite to MySQL and replaces the third-party WebSocket library with a custom WebSocket implementation. Key changes include implementing a MySQL connection pool architecture, new repository pattern for database operations, and maintaining the existing WebSocket functionality with custom code.

  • Database migration from SQLite to MySQL with connection pooling and repository pattern
  • Removal of third-party websocketpp dependency and implementation of custom WebSocket handling
  • Code formatting improvements and header reorganization across utility and test files

Reviewed Changes

Copilot reviewed 91 out of 92 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
third_party/websocketpp Removed third-party WebSocket library submodule
tests/utils/*.cpp Code formatting improvements and header reorganization
tests/model/*.cpp Updated model tests to use integer IDs and new field structures
tests/http/test_http_server.cpp Removed HTTP server tests (file deleted)
tests/http/*.cpp Code formatting improvements
tests/db/*.cpp New database tests for MySQL repositories and connection management
tests/CMakeLists.txt Updated build configuration for new MySQL-based tests
src/websocket/*.hpp/.cpp Code formatting and header reorganization
src/utils/*.hpp/.cpp Code formatting improvements and new SHA1 utility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tests/utils/test_logger.cpp
Comment thread tests/db/test_user_repository.cpp
Comment on lines +7 to +8
#include "../../src/db/respository/room_repository.hpp"
#include "../../src/db/respository/user_repository.hpp"

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in directory name: respository should be repository in both include paths.

Suggested change
#include "../../src/db/respository/room_repository.hpp"
#include "../../src/db/respository/user_repository.hpp"
#include "../../src/db/repository/room_repository.hpp"
#include "../../src/db/repository/user_repository.hpp"

Copilot uses AI. Check for mistakes.
Comment thread tests/db/test_message_repository.cpp
Comment thread tests/CMakeLists.txt
# 创建用户仓库测试可执行文件
add_executable(test_user_repository
db/test_user_repository.cpp
../src/db/respository/user_repository.cpp

Copilot AI Sep 1, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in directory name: respository should be repository in all source file paths.

Copilot uses AI. Check for mistakes.
Comment thread tests/CMakeLists.txt
Comment thread tests/CMakeLists.txt
Comment thread tests/CMakeLists.txt
@liangbm3 liangbm3 merged commit bd0ae71 into main Sep 1, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants