-
-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate from MySQL C API to MySQL X DevAPI #2704
Open
dudantas
wants to merge
56
commits into
main
Choose a base branch
from
dudantas/improve-add-database-caching
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,020
−1,201
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4c32d4a
to
c8fa521
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
5ff30f7
to
b7c2dc0
Compare
Co-Authored-By: Beats <[email protected]>
a1ff09d
to
9c9324f
Compare
This pull request encompasses the migration from the traditional MySQL C API to the modern MySQL X DevAPI across our project. This change introduces enhanced robustness, improved code readability, and leverages the modern features of MySQL X DevAPI. Key Changes: • Replaced all instances of MySQL C API function calls with their MySQL X DevAPI equivalents. • Refactored database interaction logic to utilize the fluent API provided by MySQL X DevAPI, ensuring more maintainable and clearer code. • Implemented error handling and data type conversions using MySQL X DevAPI's robust mechanisms, enhancing stability and performance. • Updated corresponding documentation and comments to reflect changes in the database access layer. This update paves the way for future database interactions to be more flexible and easier to manage. To test on Windows, you need to install the official MySQL and preferably the latest Nginx and PHP using Chocolatey.
9c9324f
to
82a8d1a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0d8d820
to
c182e31
Compare
458e0e3
to
e20497f
Compare
This commit introduces several key improvements to the PropStream and DBResult classes to enhance maintainability, type safety, and performance: 1. Encapsulation of Template Functions: Moved template function implementations from header files to .cpp files. This change reduces compilation dependencies and improves compile times by minimizing recompilation needs when templates are modified. 2. Specialized Read Functions: Replaced generic template read functions with type-specific methods such as readU8, readU16, etc. This approach enhances type safety, allowing for stricter type checks and reducing runtime errors. 3. Vector Instead of Raw Pointers: Replaced raw pointer parameters with std::vector<uint8_t> in PropStream's handling of binary data. This change increases safety by leveraging C++ container management features, avoiding manual memory management and potential data corruption issues. These changes are aimed at making the codebase more robust, easier to manage, and less prone to errors, particularly in the handling of binary data and type conversions.
ca48774
to
ff4623d
Compare
7f6a8db
to
ca11a21
Compare
e10d38e
to
1ede20d
Compare
48b282e
to
58b37e4
Compare
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
738d7f5
to
be30946
Compare
|
This PR is stale because it has been open 45 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request encompasses the migration from the traditional MySQL C API to the modern MySQL X DevAPI across our project. This change introduces enhanced robustness, improved code readability, and leverages the modern features of MySQL X DevAPI.
Key Changes:
• Replaced all instances of MySQL C API function calls with their MySQL X DevAPI equivalents.
• Refactored database interaction logic to utilize the fluent API provided by MySQL X DevAPI, ensuring more maintainable and clearer code.
• Implemented error handling and data type conversions using MySQL X DevAPI's robust mechanisms, enhancing stability and performance.
• Updated corresponding documentation and comments to reflect changes in the database access layer.
This update paves the way for future database interactions to be more flexible and easier to manage.
To test on Windows, you need to install the official MySQL and preferably the latest Nginx and PHP using Chocolatey.
Important: in mysqlx, the port used is 33060