Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 120f463

Browse files
committed
Upgrade tp Npgsql 2.1.3 and Sqlite.Core 1.0.93.0
1 parent 73751a5 commit 120f463

File tree

91 files changed

+8675
-2551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+8675
-2551
lines changed

NuGet/ServiceStack.OrmLite.PostgreSQL/servicestack.ormlite.postgresql.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<language>en-US</language>
1919
<copyright>ServiceStack 2013 and contributors</copyright>
2020
<dependencies>
21-
<dependency id="Npgsql" version="2.0.14.3" />
21+
<dependency id="Npgsql" version="2.1.3" />
2222
<dependency id="ServiceStack.OrmLite" version="4.0" />
2323
</dependencies>
2424
</metadata>

NuGet/ServiceStack.OrmLite.Sqlite.Windows/servicestack.ormlite.sqlite.windows.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<language>en-US</language>
1818
<copyright>ServiceStack 2013 and contributors</copyright>
1919
<dependencies>
20-
<dependency id="System.Data.SQLite.Core" version="1.0.91.3" />
20+
<dependency id="System.Data.SQLite.Core" version="1.0.93.0" />
2121
<dependency id="ServiceStack.OrmLite" version="4.0" />
2222
</dependencies>
2323
</metadata>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
using NUnit.Framework;
2+
using ServiceStack.DataAnnotations;
3+
using ServiceStack.OrmLite.Tests;
4+
using ServiceStack.Text;
5+
6+
namespace ServiceStack.OrmLite.PostgreSQL.Tests
7+
{
8+
public class ModelWithJsonType
9+
{
10+
public int Id { get; set; }
11+
12+
[CustomField("json")]
13+
public ComplexType ComplexTypeJson { get; set; }
14+
}
15+
16+
public class ComplexType
17+
{
18+
public int Id { get; set; }
19+
public SubType SubType { get; set; }
20+
}
21+
22+
public class SubType
23+
{
24+
public string Name { get; set; }
25+
}
26+
27+
28+
[TestFixture]
29+
public class PostgreSqlJsonTests : OrmLiteTestBase
30+
{
31+
public PostgreSqlJsonTests() : base(Dialect.PostgreSql) {}
32+
33+
[Test]
34+
public void Can_save_complex_types_as_JSON()
35+
{
36+
using (var db = OpenDbConnection())
37+
{
38+
db.DropAndCreateTable<ModelWithJsonType>();
39+
40+
db.GetLastSql().Print();
41+
42+
var row = new ModelWithJsonType
43+
{
44+
Id = 1,
45+
ComplexTypeJson = new ComplexType
46+
{
47+
Id = 2, SubType = new SubType { Name = "SubType2" }
48+
},
49+
//ComplexTypeJsonb = new ComplexType
50+
//{
51+
// Id = 3, SubType = new SubType { Name = "SubType3" }
52+
//},
53+
};
54+
55+
db.Insert(row);
56+
57+
var result = db.Select<ModelWithJsonType>(
58+
"complex_type_json->'sub_type'->>'name' = 'SubType2'");
59+
60+
Assert.That(result.Count, Is.EqualTo(1));
61+
Assert.That(result[0].Id, Is.EqualTo(2));
62+
Assert.That(result[0].ComplexTypeJson.SubType, Is.EqualTo("SubType2"));
63+
}
64+
}
65+
}
66+
}

src/ServiceStack.OrmLite.PostgreSQL.Tests/ServiceStack.OrmLite.PostgreSQL.Tests.csproj

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<TargetFrameworkProfile />
16+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17+
<RestorePackages>true</RestorePackages>
1618
</PropertyGroup>
1719
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1820
<DebugSymbols>true</DebugSymbols>
@@ -42,8 +44,13 @@
4244
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4345
</PropertyGroup>
4446
<ItemGroup>
45-
<Reference Include="Npgsql">
46-
<HintPath>..\..\lib\Npgsql.dll</HintPath>
47+
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
48+
<SpecificVersion>False</SpecificVersion>
49+
<HintPath>..\packages\Npgsql.2.1.3\lib\net40\Mono.Security.dll</HintPath>
50+
</Reference>
51+
<Reference Include="Npgsql, Version=2.1.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
52+
<SpecificVersion>False</SpecificVersion>
53+
<HintPath>..\packages\Npgsql.2.1.3\lib\net40\Npgsql.dll</HintPath>
4754
</Reference>
4855
<Reference Include="ServiceStack.Common">
4956
<HintPath>..\..\lib\ServiceStack.Common.dll</HintPath>
@@ -93,6 +100,7 @@
93100
<Compile Include="OrmLiteExecuteProcedureTests.cs" />
94101
<Compile Include="OrmLiteInsertTests.cs" />
95102
<Compile Include="OrmLiteSelectTests.cs" />
103+
<Compile Include="PostgreSqlJsonTests.cs" />
96104
<Compile Include="Properties\AssemblyInfo.cs" />
97105
<Compile Include="OrmLiteGetScalarTests.cs" />
98106
<Compile Include="SchemaTests.cs" />
@@ -102,6 +110,7 @@
102110
<None Include="app.config">
103111
<SubType>Designer</SubType>
104112
</None>
113+
<None Include="packages.config" />
105114
</ItemGroup>
106115
<ItemGroup>
107116
<ProjectReference Include="..\..\tests\ServiceStack.OrmLite.Tests\ServiceStack.OrmLite.Tests.csproj">
@@ -118,6 +127,13 @@
118127
</ProjectReference>
119128
</ItemGroup>
120129
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
130+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
131+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
132+
<PropertyGroup>
133+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
134+
</PropertyGroup>
135+
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
136+
</Target>
121137
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
122138
Other similar extension points exist, see Microsoft.Common.targets.
123139
<Target Name="BeforeBuild">
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Npgsql" version="2.1.3" targetFramework="net40" />
4+
</packages>

src/ServiceStack.OrmLite.PostgreSQL/ServiceStack.OrmLite.PostgreSQL.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@
4343
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4444
</PropertyGroup>
4545
<ItemGroup>
46-
<Reference Include="Mono.Security">
47-
<HintPath>..\packages\Npgsql.2.0.14.3\lib\net40\Mono.Security.dll</HintPath>
46+
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
47+
<SpecificVersion>False</SpecificVersion>
48+
<HintPath>..\packages\Npgsql.2.1.3\lib\net40\Mono.Security.dll</HintPath>
4849
</Reference>
49-
<Reference Include="Npgsql">
50-
<HintPath>..\packages\Npgsql.2.0.14.3\lib\net40\Npgsql.dll</HintPath>
50+
<Reference Include="Npgsql, Version=2.1.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
51+
<SpecificVersion>False</SpecificVersion>
52+
<HintPath>..\packages\Npgsql.2.1.3\lib\net40\Npgsql.dll</HintPath>
5153
</Reference>
5254
<Reference Include="ServiceStack.Common">
5355
<HintPath>..\..\lib\ServiceStack.Common.dll</HintPath>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Npgsql" version="2.0.14.3" targetFramework="net40" />
3+
<package id="Npgsql" version="2.1.3" targetFramework="net40" />
44
</packages>

src/ServiceStack.OrmLite.Sqlite.Windows/ServiceStack.OrmLite.Sqlite.Windows.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@
4747
</Reference>
4848
<Reference Include="System" />
4949
<Reference Include="System.Core" />
50-
<Reference Include="System.Data.SQLite">
51-
<HintPath>..\packages\System.Data.SQLite.Core.1.0.91.3\lib\net40\System.Data.SQLite.dll</HintPath>
50+
<Reference Include="System.Data.SQLite, Version=1.0.93.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
51+
<SpecificVersion>False</SpecificVersion>
52+
<HintPath>..\packages\System.Data.SQLite.Core.1.0.93.0\lib\net40\System.Data.SQLite.dll</HintPath>
5253
</Reference>
5354
<Reference Include="System.Xml.Linq" />
5455
<Reference Include="System.Data.DataSetExtensions" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="System.Data.SQLite.Core" version="1.0.91.3" targetFramework="net40" />
3+
<package id="System.Data.SQLite.Core" version="1.0.93.0" targetFramework="net40" />
44
</packages>
Binary file not shown.

0 commit comments

Comments
 (0)