Skip to content

Commit cf8750e

Browse files
committed
Merge branch '6.0-pgsql-datetimeoffset-return' into 6.0
2 parents d43e3ed + 51106b0 commit cf8750e

File tree

78 files changed

+1374
-1537
lines changed

Some content is hidden

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

78 files changed

+1374
-1537
lines changed

ChangeLog/6.0.4_Z_Final.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
[main] Fixed certain translation issues of interface members usage for non-perstent types initialization within queries
88
[main] Improved translation of certain subqueries used in LINQ
99
[main] Ported changes of DO 5.0 which were missing (from 5.0.18 up to 5.0.21)
10+
[postgresql] Retuned support for DateTimeOffsets
1011
[postgresql] Fixed issue when certain DateTimeOffsets operations result couldn't be used for parts extraction e.g. TotalMilliseconds
1112
[bulkoperations] Addressed wrong table alias assignment issue for Bulk Update and Bulk Delete

Orm/Xtensive.Orm.PostgreSql/Orm.Providers.PostgreSql/DomainHandler.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2008-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Gamzov
55
// Created: 2008.07.04
66

@@ -17,21 +17,19 @@ namespace Xtensive.Orm.Providers.PostgreSql
1717
/// </summary>
1818
public class DomainHandler : Providers.DomainHandler
1919
{
20-
protected override ICompiler CreateCompiler(CompilerConfiguration configuration)
21-
{
22-
return new SqlCompiler(Handlers, configuration);
23-
}
20+
protected override ICompiler CreateCompiler(CompilerConfiguration configuration) =>
21+
new SqlCompiler(Handlers, configuration);
2422

2523
protected override IEnumerable<Type> GetProviderCompilerContainers()
2624
{
2725
return base.GetProviderCompilerContainers()
2826
.Concat(new[] {
29-
typeof (NpgsqlPointCompilers),
30-
typeof (NpgsqlLSegCompilers),
31-
typeof (NpgsqlBoxCompilers),
32-
typeof (NpgsqlCircleCompilers),
33-
typeof (NpgsqlPathCompilers),
34-
typeof (NpgsqlPolygonCompilers)
27+
typeof(NpgsqlPointCompilers),
28+
typeof(NpgsqlLSegCompilers),
29+
typeof(NpgsqlBoxCompilers),
30+
typeof(NpgsqlCircleCompilers),
31+
typeof(NpgsqlPathCompilers),
32+
typeof(NpgsqlPolygonCompilers)
3533
});
3634
}
3735
}

Orm/Xtensive.Orm.PostgreSql/Orm.Providers.PostgreSql/HandlerFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2008-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Dmitri Maximov
55
// Created: 2008.09.15
66

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alena Mikshina
55
// Created: 2014.05.06
66

@@ -10,54 +10,54 @@
1010

1111
namespace Xtensive.Orm.Providers.PostgreSql
1212
{
13-
[CompilerContainer(typeof (SqlExpression))]
13+
[CompilerContainer(typeof(SqlExpression))]
1414
internal class NpgsqlBoxCompilers
1515
{
1616
#region Extractors
1717

18-
[Compiler(typeof (NpgsqlBox), "UpperRight", TargetKind.PropertyGet)]
18+
[Compiler(typeof(NpgsqlBox), "UpperRight", TargetKind.PropertyGet)]
1919
public static SqlExpression NpgsqlBoxExtractUpperRightPoint(SqlExpression _this)
2020
{
2121
return PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 0);
2222
}
2323

24-
[Compiler(typeof (NpgsqlBox), "LowerLeft", TargetKind.PropertyGet)]
24+
[Compiler(typeof(NpgsqlBox), "LowerLeft", TargetKind.PropertyGet)]
2525
public static SqlExpression NpgsqlBoxExtractLowerLeftPoint(SqlExpression _this)
2626
{
2727
return PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 1);
2828
}
2929

30-
[Compiler(typeof (NpgsqlBox), "Right", TargetKind.PropertyGet)]
30+
[Compiler(typeof(NpgsqlBox), "Right", TargetKind.PropertyGet)]
3131
public static SqlExpression NpgsqlPointExtractRight(SqlExpression _this)
3232
{
3333
return PostgresqlSqlDml.NpgsqlPointExtractX(PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 0));
3434
}
3535

36-
[Compiler(typeof (NpgsqlBox), "Top", TargetKind.PropertyGet)]
36+
[Compiler(typeof(NpgsqlBox), "Top", TargetKind.PropertyGet)]
3737
public static SqlExpression NpgsqlPointExtractTop(SqlExpression _this)
3838
{
3939
return PostgresqlSqlDml.NpgsqlPointExtractY(PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 0));
4040
}
4141

42-
[Compiler(typeof (NpgsqlBox), "Left", TargetKind.PropertyGet)]
42+
[Compiler(typeof(NpgsqlBox), "Left", TargetKind.PropertyGet)]
4343
public static SqlExpression NpgsqlPointExtractLeft(SqlExpression _this)
4444
{
4545
return PostgresqlSqlDml.NpgsqlPointExtractX(PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 1));
4646
}
4747

48-
[Compiler(typeof (NpgsqlBox), "Bottom", TargetKind.PropertyGet)]
48+
[Compiler(typeof(NpgsqlBox), "Bottom", TargetKind.PropertyGet)]
4949
public static SqlExpression NpgsqlPointExtractBottom(SqlExpression _this)
5050
{
5151
return PostgresqlSqlDml.NpgsqlPointExtractY(PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 1));
5252
}
5353

54-
[Compiler(typeof (NpgsqlBox), "Height", TargetKind.PropertyGet)]
54+
[Compiler(typeof(NpgsqlBox), "Height", TargetKind.PropertyGet)]
5555
public static SqlExpression NpgsqlPointExtractHeight(SqlExpression _this)
5656
{
5757
return PostgresqlSqlDml.NpgsqlBoxExtractHeight(_this);
5858
}
5959

60-
[Compiler(typeof (NpgsqlBox), "Width", TargetKind.PropertyGet)]
60+
[Compiler(typeof(NpgsqlBox), "Width", TargetKind.PropertyGet)]
6161
public static SqlExpression NpgsqlPointExtractWidth(SqlExpression _this)
6262
{
6363
return PostgresqlSqlDml.NpgsqlBoxExtractWidth(_this);
@@ -67,18 +67,18 @@ public static SqlExpression NpgsqlPointExtractWidth(SqlExpression _this)
6767

6868
#region Operators
6969

70-
[Compiler(typeof (NpgsqlBox), Operator.Equality, TargetKind.Operator)]
70+
[Compiler(typeof(NpgsqlBox), Operator.Equality, TargetKind.Operator)]
7171
public static SqlExpression NpgsqlBoxOperatorEquality(
72-
[Type(typeof (NpgsqlBox))] SqlExpression left,
73-
[Type(typeof (NpgsqlBox))] SqlExpression right)
72+
[Type(typeof(NpgsqlBox))] SqlExpression left,
73+
[Type(typeof(NpgsqlBox))] SqlExpression right)
7474
{
7575
return PostgresqlSqlDml.NpgsqlTypeOperatorEquality(left, right);
7676
}
7777

78-
[Compiler(typeof (NpgsqlBox), Operator.Inequality, TargetKind.Operator)]
78+
[Compiler(typeof(NpgsqlBox), Operator.Inequality, TargetKind.Operator)]
7979
public static SqlExpression NpgsqlBoxOperatorInequality(
80-
[Type(typeof (NpgsqlBox))] SqlExpression left,
81-
[Type(typeof (NpgsqlBox))] SqlExpression right)
80+
[Type(typeof(NpgsqlBox))] SqlExpression left,
81+
[Type(typeof(NpgsqlBox))] SqlExpression right)
8282
{
8383
return !NpgsqlBoxOperatorEquality(left, right);
8484
}
@@ -87,26 +87,26 @@ public static SqlExpression NpgsqlBoxOperatorInequality(
8787

8888
#region Constructors
8989

90-
[Compiler(typeof (NpgsqlBox), null, TargetKind.Constructor)]
90+
[Compiler(typeof(NpgsqlBox), null, TargetKind.Constructor)]
9191
public static SqlExpression NpgsqlBoxConstructor(
92-
[Type(typeof (float))] SqlExpression top,
93-
[Type(typeof (float))] SqlExpression right,
94-
[Type(typeof (float))] SqlExpression bottom,
95-
[Type(typeof (float))] SqlExpression left)
92+
[Type(typeof(float))] SqlExpression top,
93+
[Type(typeof(float))] SqlExpression right,
94+
[Type(typeof(float))] SqlExpression bottom,
95+
[Type(typeof(float))] SqlExpression left)
9696
{
9797
return PostgresqlSqlDml.NpgsqlBoxConstructor(
9898
PostgresqlSqlDml.NpgsqlPointConstructor(right, top),
9999
PostgresqlSqlDml.NpgsqlPointConstructor(left, bottom));
100100
}
101101

102-
[Compiler(typeof (NpgsqlBox), null, TargetKind.Constructor)]
102+
[Compiler(typeof(NpgsqlBox), null, TargetKind.Constructor)]
103103
public static SqlExpression NpgsqlBoxConstructor(
104-
[Type(typeof (NpgsqlPoint))] SqlExpression upperRight,
105-
[Type(typeof (NpgsqlPoint))] SqlExpression lowerLeft)
104+
[Type(typeof(NpgsqlPoint))] SqlExpression upperRight,
105+
[Type(typeof(NpgsqlPoint))] SqlExpression lowerLeft)
106106
{
107107
return PostgresqlSqlDml.NpgsqlBoxConstructor(upperRight, lowerLeft);
108108
}
109109

110110
#endregion
111111
}
112-
}
112+
}
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alena Mikshina
55
// Created: 2014.05.06
66

@@ -10,18 +10,18 @@
1010

1111
namespace Xtensive.Orm.Providers.PostgreSql
1212
{
13-
[CompilerContainer(typeof (SqlExpression))]
13+
[CompilerContainer(typeof(SqlExpression))]
1414
internal class NpgsqlCircleCompilers
1515
{
1616
#region Extractors
1717

18-
[Compiler(typeof (NpgsqlCircle), "Center", TargetKind.PropertyGet)]
18+
[Compiler(typeof(NpgsqlCircle), "Center", TargetKind.PropertyGet)]
1919
public static SqlExpression NpgsqlCircleExtractCenterPoint(SqlExpression _this)
2020
{
2121
return PostgresqlSqlDml.NpgsqlCircleExtractCenter(_this);
2222
}
2323

24-
[Compiler(typeof (NpgsqlCircle), "Radius", TargetKind.PropertyGet)]
24+
[Compiler(typeof(NpgsqlCircle), "Radius", TargetKind.PropertyGet)]
2525
public static SqlExpression NpgsqlCircleExtractRadius(SqlExpression _this)
2626
{
2727
return PostgresqlSqlDml.NpgsqlCircleExtractRadius(_this);
@@ -31,34 +31,34 @@ public static SqlExpression NpgsqlCircleExtractRadius(SqlExpression _this)
3131

3232
#region Operators
3333

34-
[Compiler(typeof (NpgsqlCircle), Operator.Equality, TargetKind.Operator)]
34+
[Compiler(typeof(NpgsqlCircle), Operator.Equality, TargetKind.Operator)]
3535
public static SqlExpression NpgsqlCircleOperatorEquality(
36-
[Type(typeof (NpgsqlCircle))] SqlExpression left,
37-
[Type(typeof (NpgsqlCircle))] SqlExpression right)
36+
[Type(typeof(NpgsqlCircle))] SqlExpression left,
37+
[Type(typeof(NpgsqlCircle))] SqlExpression right)
3838
{
3939
return PostgresqlSqlDml.NpgsqlTypeOperatorEquality(left, right);
4040
}
4141

42-
[Compiler(typeof (NpgsqlCircle), Operator.Inequality, TargetKind.Operator)]
42+
[Compiler(typeof(NpgsqlCircle), Operator.Inequality, TargetKind.Operator)]
4343
public static SqlExpression NpgsqlCircleOperatorInequality(
44-
[Type(typeof (NpgsqlCircle))] SqlExpression left,
45-
[Type(typeof (NpgsqlCircle))] SqlExpression right)
44+
[Type(typeof(NpgsqlCircle))] SqlExpression left,
45+
[Type(typeof(NpgsqlCircle))] SqlExpression right)
4646
{
47-
return left!=right;
47+
return left != right;
4848
}
4949

5050
#endregion
5151

5252
#region Constructors
5353

54-
[Compiler(typeof (NpgsqlCircle), null, TargetKind.Constructor)]
54+
[Compiler(typeof(NpgsqlCircle), null, TargetKind.Constructor)]
5555
public static SqlExpression NpgsqlCircleConstructor(
56-
[Type(typeof (NpgsqlPoint))] SqlExpression center,
57-
[Type(typeof (double))] SqlExpression radius)
56+
[Type(typeof(NpgsqlPoint))] SqlExpression center,
57+
[Type(typeof(double))] SqlExpression radius)
5858
{
5959
return PostgresqlSqlDml.NpgsqlCircleConstructor(center, radius);
6060
}
6161

6262
#endregion
6363
}
64-
}
64+
}
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alena Mikshina
55
// Created: 2014.05.06
66

@@ -10,18 +10,18 @@
1010

1111
namespace Xtensive.Orm.Providers.PostgreSql
1212
{
13-
[CompilerContainer(typeof (SqlExpression))]
13+
[CompilerContainer(typeof(SqlExpression))]
1414
internal static class NpgsqlLSegCompilers
1515
{
1616
#region Extractors
1717

18-
[Compiler(typeof (NpgsqlLSeg), "Start", TargetKind.PropertyGet)]
18+
[Compiler(typeof(NpgsqlLSeg), "Start", TargetKind.PropertyGet)]
1919
public static SqlExpression NpgsqlLSegExtractStartPoint(SqlExpression _this)
2020
{
21-
return PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 0);
21+
return PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 0);
2222
}
2323

24-
[Compiler(typeof (NpgsqlLSeg), "End", TargetKind.PropertyGet)]
24+
[Compiler(typeof(NpgsqlLSeg), "End", TargetKind.PropertyGet)]
2525
public static SqlExpression NpgsqlLSegExtractEndPoint(SqlExpression _this)
2626
{
2727
return PostgresqlSqlDml.NpgsqlTypeExtractPoint(_this, 1);
@@ -31,34 +31,34 @@ public static SqlExpression NpgsqlLSegExtractEndPoint(SqlExpression _this)
3131

3232
#region Operators
3333

34-
[Compiler(typeof (NpgsqlLSeg), Operator.Equality, TargetKind.Operator)]
34+
[Compiler(typeof(NpgsqlLSeg), Operator.Equality, TargetKind.Operator)]
3535
public static SqlExpression NpgsqlLSegOperatorEquality(
36-
[Type(typeof (NpgsqlLSeg))] SqlExpression left,
37-
[Type(typeof (NpgsqlLSeg))] SqlExpression right)
36+
[Type(typeof(NpgsqlLSeg))] SqlExpression left,
37+
[Type(typeof(NpgsqlLSeg))] SqlExpression right)
3838
{
39-
return left==right;
39+
return left == right;
4040
}
4141

42-
[Compiler(typeof (NpgsqlLSeg), Operator.Inequality, TargetKind.Operator)]
42+
[Compiler(typeof(NpgsqlLSeg), Operator.Inequality, TargetKind.Operator)]
4343
public static SqlExpression NpgsqlLSegOperatorInequality(
44-
[Type(typeof (NpgsqlLSeg))] SqlExpression left,
45-
[Type(typeof (NpgsqlLSeg))] SqlExpression right)
44+
[Type(typeof(NpgsqlLSeg))] SqlExpression left,
45+
[Type(typeof(NpgsqlLSeg))] SqlExpression right)
4646
{
47-
return left!=right;
47+
return left != right;
4848
}
4949

5050
#endregion
5151

5252
#region Constructors
5353

54-
[Compiler(typeof (NpgsqlLSeg), null, TargetKind.Constructor)]
54+
[Compiler(typeof(NpgsqlLSeg), null, TargetKind.Constructor)]
5555
public static SqlExpression NpgsqlLSegConstructor(
56-
[Type(typeof (NpgsqlPoint))] SqlExpression start,
57-
[Type(typeof (NpgsqlPoint))] SqlExpression end)
56+
[Type(typeof(NpgsqlPoint))] SqlExpression start,
57+
[Type(typeof(NpgsqlPoint))] SqlExpression end)
5858
{
5959
return PostgresqlSqlDml.NpgsqlLSegConstructor(start, end);
6060
}
6161

6262
#endregion
6363
}
64-
}
64+
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2020 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alena Mikshina
55
// Created: 2014.05.06
66

@@ -9,26 +9,26 @@
99

1010
namespace Xtensive.Orm.Providers.PostgreSql
1111
{
12-
[CompilerContainer(typeof (SqlExpression))]
12+
[CompilerContainer(typeof(SqlExpression))]
1313
internal class NpgsqlPathCompilers
1414
{
15-
[Compiler(typeof (NpgsqlPath), "Count", TargetKind.PropertyGet)]
15+
[Compiler(typeof(NpgsqlPath), "Count", TargetKind.PropertyGet)]
1616
public static SqlExpression NpgsqlPathCount(SqlExpression _this)
1717
{
1818
return PostgresqlSqlDml.NpgsqlPathAndPolygonCount(_this);
1919
}
2020

21-
[Compiler(typeof (NpgsqlPath), "Open", TargetKind.PropertyGet)]
21+
[Compiler(typeof(NpgsqlPath), "Open", TargetKind.PropertyGet)]
2222
public static SqlExpression NpgsqlPathOpen(SqlExpression _this)
2323
{
2424
return PostgresqlSqlDml.NpgsqlPathAndPolygonOpen(_this);
2525
}
2626

27-
[Compiler(typeof (NpgsqlPath), "Contains", TargetKind.Method)]
27+
[Compiler(typeof(NpgsqlPath), "Contains", TargetKind.Method)]
2828
public static SqlExpression NpgsqlPathContains(SqlExpression _this,
29-
[Type(typeof (NpgsqlPoint))] SqlExpression point)
29+
[Type(typeof(NpgsqlPoint))] SqlExpression point)
3030
{
3131
return PostgresqlSqlDml.NpgsqlPathAndPolygonContains(_this, point);
3232
}
3333
}
34-
}
34+
}

0 commit comments

Comments
 (0)