Silk.Data.SQL.SQLite3
0.1.2.2
dotnet add package Silk.Data.SQL.SQLite3 --version 0.1.2.2
NuGet\Install-Package Silk.Data.SQL.SQLite3 -Version 0.1.2.2
<PackageReference Include="Silk.Data.SQL.SQLite3" Version="0.1.2.2" />
paket add Silk.Data.SQL.SQLite3 --version 0.1.2.2
#r "nuget: Silk.Data.SQL.SQLite3, 0.1.2.2"
// Install Silk.Data.SQL.SQLite3 as a Cake Addin
#addin nuget:?package=Silk.Data.SQL.SQLite3&version=0.1.2.2
// Install Silk.Data.SQL.SQLite3 as a Cake Tool
#tool nuget:?package=Silk.Data.SQL.SQLite3&version=0.1.2.2
Overview
SQLite3 provider for Silk.Data.SQL.Base
.
Limitations
SQLite3 lacks full support for DECIMAL data types. Decimal data upto 15 digits is supported in testing, anything larger and SQLite3 will return the 15 most significant digits.
Usage
To execute SQL statements just create an instance of SQLite3DataProvider
, passing in the name of the file you wish to store your database in.
var provider = new SQLite3DataProvider("myapp.db");
If you want to create an in-memory database provide ":memory:"
.
Executing Queries
Non-reader queries:
provider.ExecuteNonReaderAsync(
QueryExpression.Insert(
"Accounts",
new[] { "DisplayName" },
new object[] { "John" },
new object[] { "Jane" }
)
);
Queries with results need to be disposed:
using (var queryResult = provider.ExecuteReader(
QueryExpression.Select(
new[] { Expression.Value("Hello World!") }
)))
{
Assert.IsTrue(queryResult.HasRows);
Assert.IsTrue(queryResult.Read());
Assert.AreEqual("Hello World!", queryResult.GetString(0));
}
Raw SQL
A raw SQL expression is provided on the SQLite3
helper class.
var rawSQL = SQLite3.Raw("SELECT random()");
Raw SQL expressions are safe to be used within TransactionExpression
:
var transaction = QueryExpression.Transaction(
SQLite3.Raw("SELECT date()"),
SQLite3.Raw("SELECT time()")
);
License
Silk.Data.SQL.SQLite3
is made available under the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. |
.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 was computed. |
.NET Framework | net461 was computed. net462 was computed. 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. |
-
.NETStandard 2.0
- Microsoft.Data.Sqlite (>= 2.2.2)
- Silk.Data.SQL.Base (>= 0.1.2.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Silk.Data.SQL.SQLite3:
Package | Downloads |
---|---|
Silk.Data.SQL.ProvidersBundle
Silk.Data.SQL providers bundle, includes Sqlite3, Postgresql, MySQL/MariaDB and SQL Server support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.2.2 | 783 | 2/26/2019 |