server icon indicating copy to clipboard operation
server copied to clipboard

Core: More SQL refactoring and tidying

Open zach2good opened this issue 9 months ago • 1 comments

I affirm:

  • [x] I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • [x] I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • [x] I have read and understood the Contributing Guide and the Code of Conduct.
  • [x] 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?

  • More prepared stmts
  • More multiple strings and not backslash broken strings
  • Clean up LoadChar a bit
  • Remove raw new from guilds
  • Adds LIMIT 1 to a bunch of places

TODO

  • [x] Remove _sql legacy handle
  • [x] Remove sql.h/sql.cpp
  • [x] Remove all "naked" queries for prepared statements
  • [ ] Address all leftover TODOs, SQL->GetData() is popular here
  • [ ] Make sure we aren't reusing rsets (const auto rset = ... only!)
  • [ ] Audit all db::preparedStmts (530, or so) for %'s and proper use of rset
  • [x] First-class support for enums in database, remove old support casting
  • [x] Everything compiles again
  • [ ] Log in, zone, form parties, send messages
  • [ ] We're free of ALL Athena code!

zach2good avatar Apr 13 '25 13:04 zach2good

Optional extra: constexpr checks on preparedStmt to ensure they aren't using {} or %u/%s/%i etc.

zach2good avatar Apr 17 '25 14:04 zach2good

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Sep 18 '25 02:09 github-actions[bot]

@sruon I think you've achieved everything I wanted to do in this PR? Did you also pick out the first-class enum support? If so this PR can be killed

zach2good avatar Sep 18 '25 12:09 zach2good

I'll pull out the enum class part this week and then close it

sruon avatar Sep 18 '25 12:09 sruon

Replaced by #8248

sruon avatar Sep 29 '25 05:09 sruon