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

Refactoring of Statement and Column classes #349

Merged
merged 7 commits into from
Mar 29, 2022

Conversation

Kacperos155
Copy link
Contributor

@Kacperos155 Kacperos155 commented Jan 26, 2022

As title says I refactored Statement and Columns with minimal changes to wrapper API.
List of all major changes:

  • Replaced macro long size checks with fixed width ints for Statement::bind
    (Macros are still needed for "operator long" in Columns but not in Statement binds methods. Fixed width ints should properly detect size of long function parameter)
  • Replaced Statement::Ptr with std::shared_ptr<sqlite3_stmt> (aliased as TStatementPtr) - need for this was mentioned there.
  • Added Statement move assignment (and so fixing Feature request: move-assignment operator for Statement #347 )
  • Column throws when created with empty pointer to prepered statement.
  • Statement methods: getIndex, getColumn, getExpandedSQL are now const

@SRombauts SRombauts self-assigned this Mar 18, 2022
@SRombauts SRombauts merged commit 9158225 into SRombauts:master Mar 29, 2022
@SRombauts
Copy link
Owner

This work was long overdue, I find it awesome that you tackled it and contributed back :)
Thanks!

@Kacperos155 Kacperos155 deleted the refactoring-Statement&Column branch March 29, 2022 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants