Add cipher_compatibility support for SQLCipher#10
Merged
ValentinMontmirail merged 1 commit intomasterfrom Dec 26, 2023
Merged
Conversation
This commit introduces support for the `cipher_compatibility` PRAGMA in the SQLCipher Go wrapper. The change allows setting the compatibility level for SQLCipher, enabling backward compatibility with databases created with older versions of SQLCipher. This feature is crucial for applications that need to interact with databases across different versions of SQLCipher. Modifications include parsing the compatibility level from parameters, handling errors, and invoking the PRAGMA command post-connection setup. Error messages have been added for invalid compatibility levels to ensure that users are informed of incorrect usage. Additionally, the default value is set to `-1` to maintain existing behavior when the parameter is not explicitly provided.
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #10 +/- ##
==========================================
- Coverage 47.02% 46.79% -0.24%
==========================================
Files 13 13
Lines 1952 1964 +12
==========================================
+ Hits 918 919 +1
- Misses 895 904 +9
- Partials 139 141 +2 ☔ View full report in Codecov by Sentry. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit introduces support for the
cipher_compatibilityPRAGMA in the SQLCipher Go wrapper.The change allows setting the compatibility level for SQLCipher, enabling backward compatibility with databases created with older versions of SQLCipher. This feature is crucial for applications that need to interact with databases across different versions of SQLCipher.
Modifications include parsing the compatibility level from parameters, handling errors, and invoking the PRAGMA command post-connection setup. Error messages have been added for invalid compatibility levels to ensure that users are informed of incorrect usage. Additionally, the default value is set to
-1to maintain existing behavior when the parameter is not explicitly provided.