Skip to content

Add SQLite synchronous connection string option - #38812

Open
AhmedSadek10 wants to merge 2 commits into
dotnet:mainfrom
AhmedSadek10:issue-38769-sqlite-synchronous
Open

Add SQLite synchronous connection string option#38812
AhmedSadek10 wants to merge 2 commits into
dotnet:mainfrom
AhmedSadek10:issue-38769-sqlite-synchronous

Conversation

@AhmedSadek10

Copy link
Copy Markdown
  • Add SqliteSynchronousMode and connection string support
  • Apply PRAGMA synchronous when opening connections
  • Add builder and connection tests

Fixes #38769

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

- Add SqliteSynchronousMode and connection string support
- Apply PRAGMA synchronous when opening connections
- Add builder and connection tests

Fixes dotnet#38769
@AhmedSadek10

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

@AndriySvyryd
AndriySvyryd requested a balanced review from Copilot August 14, 2026 22:09
@AndriySvyryd AndriySvyryd self-assigned this Aug 14, 2026
@AndriySvyryd AndriySvyryd added this to the 12.0.0 milestone Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurable SQLite synchronous modes through connection strings and applies them when connections open.

Changes:

  • Adds SqliteSynchronousMode and builder support.
  • Applies PRAGMA synchronous during connection opening.
  • Adds API baseline and unit-test coverage.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SqliteSynchronousMode.cs Defines supported synchronous modes.
SqliteConnectionStringBuilder.cs Adds the Synchronous option.
SqliteConnection.cs Applies the configured pragma.
Microsoft.Data.Sqlite.Core.baseline.json Records the new public API.
SqliteConnectionTest.cs Tests modes on non-pooled connections.
SqliteConnectionStringBuilderTest.cs Tests builder parsing and serialization.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs
- Verify the native connection is reused after reopening
- Verify the configured synchronous mode is reapplied
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.

Allow configuring SQLite synchronous mode in the connection string

3 participants