Skip to content
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

Cleanup the code of the MySQL connector #511

Merged
merged 14 commits into from
Aug 7, 2023

Conversation

MeanSquaredError
Copy link
Contributor

This PR makes the following changes to the PostgreSQL connector code:

  • The following classes had their method definitions partly in-class and partly out-of-class:
sqlpp::postgresql::detail::statement_handle_t
sqlpp::postgresql::detail::prepared_statement_handle_t
sqlpp::postgresql::prepared_statement_t
sqlpp::postgresql::::Result
sqlpp::postgresql::bind_result_t
sqlpp::postgresql::connection_base

For the above classes all method definitions were moved in-class.

  • Several methods that were defined in-class had superfluous inline specifiers that were removed.
  • Removed sqlpp::postgresql::Result::hasError() which was declared but not defined and not used.
  • Added/removed a couple of comments.
  • Simplified cleanup of native PostgreSQL handles pretty much like we did with MySQL handles.
  • Added const qualifiers.
  • Removed superfluous namespace qualifiers.
  • Changed some variables/methods from CamelCase to snake_case.

The PR has been built with

cmake -B build -DBUILD_POSTGRESQL_CONNECTOR=ON -DBUILD_SQLITE3_CONNECTOR=ON -DBUILD_MYSQL_CONNECTOR=ON -DBUILD_TESTING=ON -DUSE_SYSTEM_DATE=ON -DDEPENDENCY_CHECK=ON

All tests passed successfully.

@rbock rbock merged commit d800f4d into rbock:main Aug 7, 2023
@rbock
Copy link
Owner

rbock commented Aug 7, 2023

Thanks for the large-scale cleanup!

@MeanSquaredError MeanSquaredError deleted the cleanup_conn_postgresql branch August 8, 2023 00:21
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