Skip to content

Conversation

@ValentinMontmirail
Copy link
Owner

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.

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-commenter
Copy link

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (ac3f80f) 47.02% compared to head (0788963) 46.79%.
Report is 1 commits behind head on master.

Files Patch % Lines
sqlite3.go 8.33% 9 Missing and 2 partials ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ValentinMontmirail ValentinMontmirail merged commit 62f3831 into master Dec 26, 2023
@ValentinMontmirail ValentinMontmirail deleted the feature/latest-sql-features-supported branch December 26, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants