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

Activate extended result codes, and expose result codes as Swift constants #180

Merged
merged 23 commits into from
Mar 2, 2017

Conversation

groue
Copy link
Owner

@groue groue commented Mar 1, 2017

This PR addresses #171 by @hartbit.

  • it activates extended result codes, so that SQLite reports more precise errors.
  • it introduces a new type ResultCode which has constants for all SQLite-declared result codes, so that the end user can access those result codes by name without importing the low-level C SQLite module.
  • it modifies DatabaseError so that its former code: Int32 property is replaced with two new properties: resultCode and extendedResultCode, which both let the user handle errors at the desired level of precision.

Documentation

Remaining TODOs:

  • add a fixit for migrating away from obsolete code property
  • check the availability of sqlite3_extended_result_codes

@groue groue merged commit 39a0b56 into master Mar 2, 2017
@groue
Copy link
Owner Author

groue commented Mar 2, 2017

@hartbit, this has shipped in v0.102.0.

@groue groue deleted the Issue171 branch March 2, 2017 12:43
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.

1 participant