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

db: Add ResultSetWrapper type #6300

Draft
wants to merge 4 commits into
base: base
Choose a base branch
from
Draft

db: Add ResultSetWrapper type #6300

wants to merge 4 commits into from

Conversation

zach2good
Copy link
Contributor

@zach2good zach2good commented Oct 2, 2024

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Changes syntax from:

    auto zoneId = rset->getUInt("pos_zone");

to

    auto zoneId = rset->get<uint16>("pos_zone");

Related issues:
#4577
#6355

@zach2good zach2good marked this pull request as draft October 2, 2024 09:58
@zach2good zach2good force-pushed the rset_proxy branch 2 times, most recently from 74ede76 to 7231ae2 Compare October 2, 2024 10:25
@zach2good
Copy link
Contributor Author

While I'm here I'm also going to convert the SQL queries in charutils to be preparedstmts: #4577

@zach2good
Copy link
Contributor Author

For my own peace of mind, I'm probably also going to add a test executable that communicates with a temporary test database, and writes/reads things into the db and confirms they've made it back OK.

I can also do comparative testing with the current db stuff. Once everything is confirmed, I can push harder to replace the existing system.

TODO:

  • String escaping
  • Validation/reconnection/pinging
  • Charset stuff
  • Keepalive settings
  • Encoding
    std::string GetDatabaseName();
    std::string GetClientVersion();
    std::string GetServerVersion();
  • Query helpers with fmt and sprintf built in
  • autocommit
  • transaction stuff
  • profiling tools

@zach2good
Copy link
Contributor Author

Even if I'm considering moving to a different SQL connector lib in the future, this is still useful as a layer of abstraction on top so the main code only changes once and I can futz with the underlying driver code

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.

1 participant