Changes for 3.1 #5
|
@ -13,7 +13,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FSharp.SystemTextJson" Version="1.2.42" />
|
<PackageReference Include="FSharp.SystemTextJson" Version="1.3.13" />
|
||||||
|
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<AssemblyVersion>3.1.0.0</AssemblyVersion>
|
<AssemblyVersion>3.1.0.0</AssemblyVersion>
|
||||||
<FileVersion>3.1.0.0</FileVersion>
|
<FileVersion>3.1.0.0</FileVersion>
|
||||||
<VersionPrefix>3.1.0</VersionPrefix>
|
<VersionPrefix>3.1.0</VersionPrefix>
|
||||||
|
<PackageReleaseNotes>Add BT (between) operator; drop .NET 7 support</PackageReleaseNotes>
|
||||||
<Authors>danieljsummers</Authors>
|
<Authors>danieljsummers</Authors>
|
||||||
<Company>Bit Badger Solutions</Company>
|
<Company>Bit Badger Solutions</Company>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Npgsql.FSharp" Version="5.7.0" />
|
<PackageReference Include="Npgsql.FSharp" Version="5.7.0" />
|
||||||
|
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.6" />
|
||||||
|
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Expecto" Version="10.1.0" />
|
<PackageReference Include="Expecto" Version="10.2.1" />
|
||||||
<PackageReference Include="ThrowawayDb.Postgres" Version="1.4.0" />
|
<PackageReference Include="ThrowawayDb.Postgres" Version="1.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -549,7 +549,7 @@ public static class PostgresCSharpTests
|
||||||
var theCount = await Count.All(PostgresDb.TableName);
|
var theCount = await Count.All(PostgresDb.TableName);
|
||||||
Expect.equal(theCount, 5, "There should have been 5 matching documents");
|
Expect.equal(theCount, 5, "There should have been 5 matching documents");
|
||||||
}),
|
}),
|
||||||
TestCase("ByField succeeds", async () =>
|
TestCase("ByField succeeds for numeric range", async () =>
|
||||||
{
|
{
|
||||||
await using var db = PostgresDb.BuildDb();
|
await using var db = PostgresDb.BuildDb();
|
||||||
await LoadDocs();
|
await LoadDocs();
|
||||||
|
@ -557,6 +557,14 @@ public static class PostgresCSharpTests
|
||||||
var theCount = await Count.ByField(PostgresDb.TableName, Field.BT("NumValue", 10, 20));
|
var theCount = await Count.ByField(PostgresDb.TableName, Field.BT("NumValue", 10, 20));
|
||||||
Expect.equal(theCount, 3, "There should have been 3 matching documents");
|
Expect.equal(theCount, 3, "There should have been 3 matching documents");
|
||||||
}),
|
}),
|
||||||
|
TestCase("ByField succeeds for non-numeric range", async () =>
|
||||||
|
{
|
||||||
|
await using var db = PostgresDb.BuildDb();
|
||||||
|
await LoadDocs();
|
||||||
|
|
||||||
|
var theCount = await Count.ByField(PostgresDb.TableName, Field.BT("Value", "aardvark", "apple"));
|
||||||
|
Expect.equal(theCount, 1, "There should have been 1 matching document");
|
||||||
|
}),
|
||||||
TestCase("ByContains succeeds", async () =>
|
TestCase("ByContains succeeds", async () =>
|
||||||
{
|
{
|
||||||
await using var db = PostgresDb.BuildDb();
|
await using var db = PostgresDb.BuildDb();
|
||||||
|
|
|
@ -399,13 +399,21 @@ public static class SqliteCSharpTests
|
||||||
var theCount = await Count.All(SqliteDb.TableName);
|
var theCount = await Count.All(SqliteDb.TableName);
|
||||||
Expect.equal(theCount, 5L, "There should have been 5 matching documents");
|
Expect.equal(theCount, 5L, "There should have been 5 matching documents");
|
||||||
}),
|
}),
|
||||||
TestCase("ByField succeeds", async () =>
|
TestCase("ByField succeeds for numeric range", async () =>
|
||||||
{
|
{
|
||||||
await using var db = await SqliteDb.BuildDb();
|
await using var db = await SqliteDb.BuildDb();
|
||||||
await LoadDocs();
|
await LoadDocs();
|
||||||
|
|
||||||
var theCount = await Count.ByField(SqliteDb.TableName, Field.BT("NumValue", 10, 20));
|
var theCount = await Count.ByField(SqliteDb.TableName, Field.BT("NumValue", 10, 20));
|
||||||
Expect.equal(theCount, 3L, "There should have been 3 matching documents");
|
Expect.equal(theCount, 3L, "There should have been 3 matching documents");
|
||||||
|
}),
|
||||||
|
TestCase("ByField succeeds for non-numeric range", async () =>
|
||||||
|
{
|
||||||
|
await using var db = await SqliteDb.BuildDb();
|
||||||
|
await LoadDocs();
|
||||||
|
|
||||||
|
var theCount = await Count.ByField(SqliteDb.TableName, Field.BT("Value", "aardvark", "apple"));
|
||||||
|
Expect.equal(theCount, 1L, "There should have been 1 matching document");
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
TestList("Exists", new[]
|
TestList("Exists", new[]
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Expecto" Version="10.1.0" />
|
<PackageReference Include="Expecto" Version="10.2.1" />
|
||||||
|
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -488,13 +488,20 @@ let integrationTests =
|
||||||
let! theCount = Count.all PostgresDb.TableName
|
let! theCount = Count.all PostgresDb.TableName
|
||||||
Expect.equal theCount 5 "There should have been 5 matching documents"
|
Expect.equal theCount 5 "There should have been 5 matching documents"
|
||||||
}
|
}
|
||||||
testTask "byField succeeds" {
|
testTask "byField succeeds for numeric range" {
|
||||||
use db = PostgresDb.BuildDb()
|
use db = PostgresDb.BuildDb()
|
||||||
do! loadDocs ()
|
do! loadDocs ()
|
||||||
|
|
||||||
let! theCount = Count.byField PostgresDb.TableName (Field.BT "NumValue" 10 20)
|
let! theCount = Count.byField PostgresDb.TableName (Field.BT "NumValue" 10 20)
|
||||||
Expect.equal theCount 3 "There should have been 3 matching documents"
|
Expect.equal theCount 3 "There should have been 3 matching documents"
|
||||||
}
|
}
|
||||||
|
testTask "byField succeeds for non-numeric range" {
|
||||||
|
use db = PostgresDb.BuildDb()
|
||||||
|
do! loadDocs ()
|
||||||
|
|
||||||
|
let! theCount = Count.byField PostgresDb.TableName (Field.BT "Value" "aardvark" "apple")
|
||||||
|
Expect.equal theCount 1 "There should have been 1 matching document"
|
||||||
|
}
|
||||||
testTask "byContains succeeds" {
|
testTask "byContains succeeds" {
|
||||||
use db = PostgresDb.BuildDb()
|
use db = PostgresDb.BuildDb()
|
||||||
do! loadDocs ()
|
do! loadDocs ()
|
||||||
|
|
|
@ -381,13 +381,20 @@ let integrationTests =
|
||||||
let! theCount = Count.all SqliteDb.TableName
|
let! theCount = Count.all SqliteDb.TableName
|
||||||
Expect.equal theCount 5L "There should have been 5 matching documents"
|
Expect.equal theCount 5L "There should have been 5 matching documents"
|
||||||
}
|
}
|
||||||
testTask "byField succeeds" {
|
testTask "byField succeeds for a numeric range" {
|
||||||
use! db = SqliteDb.BuildDb()
|
use! db = SqliteDb.BuildDb()
|
||||||
do! loadDocs ()
|
do! loadDocs ()
|
||||||
|
|
||||||
let! theCount = Count.byField SqliteDb.TableName (Field.BT "NumValue" 10 20)
|
let! theCount = Count.byField SqliteDb.TableName (Field.BT "NumValue" 10 20)
|
||||||
Expect.equal theCount 3L "There should have been 3 matching documents"
|
Expect.equal theCount 3L "There should have been 3 matching documents"
|
||||||
}
|
}
|
||||||
|
testTask "byField succeeds for a non-numeric range" {
|
||||||
|
use! db = SqliteDb.BuildDb()
|
||||||
|
do! loadDocs ()
|
||||||
|
|
||||||
|
let! theCount = Count.byField SqliteDb.TableName (Field.BT "Value" "aardvark" "apple")
|
||||||
|
Expect.equal theCount 1L "There should have been 1 matching document"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
testList "Exists" [
|
testList "Exists" [
|
||||||
testList "byId" [
|
testList "byId" [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user