NuExt.System.Data.SQLite
0.2.0
dotnet add package NuExt.System.Data.SQLite --version 0.2.0
NuGet\Install-Package NuExt.System.Data.SQLite -Version 0.2.0
<PackageReference Include="NuExt.System.Data.SQLite" Version="0.2.0" />
paket add NuExt.System.Data.SQLite --version 0.2.0
#r "nuget: NuExt.System.Data.SQLite, 0.2.0"
// Install NuExt.System.Data.SQLite as a Cake Addin #addin nuget:?package=NuExt.System.Data.SQLite&version=0.2.0 // Install NuExt.System.Data.SQLite as a Cake Tool #tool nuget:?package=NuExt.System.Data.SQLite&version=0.2.0
NuExt.System.Data.SQLite
NuExt.System.Data.SQLite
is a powerful extension library for the SQLite database engine, designed to enhance your data access layer with robust and thread-safe operations. The package offers tools for efficient transaction management, smooth database schema updates, and safe concurrent access, ensuring consistency and reliability in your applications.
Features
- Safe Concurrent Data Access: Implements mechanisms to manage parallel data operations across multiple threads within SQLite's locking constraints, ensuring consistency.
- Robust Database Context Management: Simplifies the handling of database connections and contexts, making it easy to manage their lifecycle and interactions.
- Efficient Transaction Handling: Provides straightforward methods for managing transactions, ensuring atomicity and durability.
- Schema Updates and Migrations: Facilitates controlled updates to the database schema through a structured approach.
Important Considerations
SQLite uses file-level locking during write transactions, which means:
- While a write transaction is active, other threads or processes cannot write to the database. They will wait until the transaction is completed (committed or rolled back).
- Read operations can still proceed concurrently with a write transaction under normal circumstances.
This behavior ensures data integrity and consistency but requires careful management of concurrent write operations to avoid performance bottlenecks.
Database Locking Error
In scenarios where multiple write operations occur simultaneously, especially in journaled mode, you might encounter the "database is locked" error. System.Data.SQLite.SQLiteDbConnection
is designed to help avoid this specific issue by managing transactions and concurrency via a set of AcquireLock
methods. These methods ensure thread-safe execution of database operations while holding a lock and help to prevent "database is locked" errors.
Commonly Used Types
System.Data.SQLite.SQLiteDalBase
: Base class for SQLite-specific Data Access Layer (DAL) operations.System.Data.SQLite.SQLiteDbConnection
: Wrapper for SQLite connections providing thread-safe concurrent access and a set of methods for data management.System.Data.SQLite.SQLiteDbContext
: SQLite database context providing connection and transaction management.System.Data.SQLite.SQLiteDbConverter
: Base class for applying updates to the SQLite database schema.System.Data.SQLite.SQLiteDbTransaction
: Provides methods for managing SQLite transactions.
Installation
You can install NuExt.System.Data.SQLite
via NuGet:
dotnet add package NuExt.System.Data.SQLite
Or through the Visual Studio package manager:
- Go to
Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution...
. - Search for
NuExt.System.Data.SQLite
. - Click "Install".
Usage Examples
For examples of how to use these classes, see the samples. These samples provide practical guidance on implementing the library's features in real-world scenarios.
Contributing
Contributions are welcome! Feel free to submit issues, fork the repository, and send pull requests. Your feedback and suggestions for improvement are highly appreciated.
License
Licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
-
.NETStandard 2.0
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
-
.NETStandard 2.1
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
-
net6.0
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
-
net8.0
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
-
net9.0
- NuExt.System.Data (>= 0.2.0)
- System.Data.SQLite.Core (>= 1.0.119)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.