Skip to content

Commit 41b44fc

Browse files
committed
Version bump to 3.1.0
1 parent c3c39b3 commit 41b44fc

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.1.0 - 2023-01-16
4+
5+
- [Minor] Breaking API Change: `PrimaryKey` attribute defaults to `shouldInsert: false` as most uses will have the Database generate the primary key.
6+
- Merged [#60](https://github.com/supabase-community/postgrest-csharp/pull/60) which Added linq support for `Select`, `Where`, `OnConflict`, `Columns`, `Order`, `Update`, `Set`, and `Delete`
7+
38
## 3.0.4 - 2022-11-22
49

510
## 3.0.3 - 2022-11-22

Postgrest/Postgrest.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
</Description>
2020
<PackageIconUrl>https://avatars.githubusercontent.com/u/54469796?s=200&amp;v=4</PackageIconUrl>
2121
<PackageTags>supabase,postgrest</PackageTags>
22-
<ReleaseVersion>3.0.4</ReleaseVersion>
23-
<PackageVersion>3.0.4</PackageVersion>
22+
<ReleaseVersion>3.1.0</ReleaseVersion>
23+
<PackageVersion>3.1.0</PackageVersion>
2424
</PropertyGroup>
2525
<PropertyGroup>
2626
<Nullable>enable</Nullable>
2727
<LangVersion>latest</LangVersion>
2828
<WarningsAsErrors>CS8600;CS8602;CS8603</WarningsAsErrors>
2929
</PropertyGroup>
3030
<PropertyGroup Condition=" '$(Version)' == '' ">
31-
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">3.0.4</VersionPrefix>
31+
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">3.1.0</VersionPrefix>
3232
<VersionSuffix Condition=" '$(VersionSuffix)' == '' ">
3333
</VersionSuffix>
3434
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>

PostgrestExample/PostgrestExample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<ReleaseVersion>3.0.4</ReleaseVersion>
5+
<ReleaseVersion>3.1.0</ReleaseVersion>
66
</PropertyGroup>
77
<PropertyGroup>
88
<LangVersion>latest</LangVersion>

PostgrestTests/Linq.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ public async Task TestLinqWhere()
9191

9292
foreach (var q in query6.Models)
9393
Assert.IsTrue(q.ListOfFloats.Contains(10));
94+
95+
var query7 = await client.Table<KitchenSink>()
96+
.Filter(x => x.DateTimeValue, Operator.NotEqual, null)
97+
.Get();
98+
99+
foreach (var q in query7.Models)
100+
Assert.IsNotNull(q.DateTimeValue);
94101
}
95102

96103
[TestMethod("Linq: OnConflict")]

PostgrestTests/PostgrestTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<IsPackable>false</IsPackable>
6-
<ReleaseVersion>3.0.4</ReleaseVersion>
6+
<ReleaseVersion>3.1.0</ReleaseVersion>
77
</PropertyGroup>
88

99
<PropertyGroup>

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
## Now supporting (many) LINQ expressions!
1515

1616
```c#
17-
var query = await client.Table<Movie>()
18-
.Select(x => new object[] { x.Id, x.Name, x.Tags, x.ReleaseDate })
19-
.Where(x => x.Tags.Contains("Action") || x.Tags.Contains("Adventure"))
20-
.Order(x => x.ReleaseDate, Ordering.Descending)
21-
.Get();
17+
await client.Table<Movie>()
18+
.Select(x => new object[] { x.Id, x.Name, x.Tags, x.ReleaseDate })
19+
.Where(x => x.Tags.Contains("Action") || x.Tags.Contains("Adventure"))
20+
.Order(x => x.ReleaseDate, Ordering.Descending)
21+
.Get();
22+
23+
await client.Table<Movie>()
24+
.Set(x => new KeyValuePair<object,object>(x.WatchedAt, DateTime.Now))
25+
.Where(x => x.Id == "11111-22222-33333-44444")
26+
// Or .Filter(x => x.Id, Operator.Equals, "11111-22222-33333-44444")
27+
.Update();
28+
2229
```
2330

2431
---

0 commit comments

Comments
 (0)