1010namespace Xtensive . Orm . Providers . PostgreSql
1111{
1212 /// <summary>
13- /// Contains factory methods for SQL DML operations over Geometry types of the Postgre SQL DBMS.
13+ /// A factory for SQL DML operations for Postgresql DBMS.
14+ /// Similarly to <see cref="Xtensive.Sql.SqlDml"/> it contains
15+ /// factory methods for provider-specific <see cref="SqlExpression"/>s.
1416 /// </summary>
15- public class PostgresqlSqlGeometryDml
17+ public class PostgresqlSqlDml
1618 {
1719 #region Spatial types
1820
@@ -25,7 +27,7 @@ public static SqlExpression NpgsqlTypeExtractPoint(SqlExpression operand, SqlExp
2527 {
2628 ArgumentValidator . EnsureArgumentNotNull ( operand , nameof ( operand ) ) ;
2729 ArgumentValidator . EnsureArgumentNotNull ( pointIndex , nameof ( pointIndex ) ) ;
28- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlTypeExtractPoint , operand , pointIndex ) ;
30+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlTypeExtractPoint , operand , pointIndex ) ;
2931 }
3032
3133 /// <summary>
@@ -36,7 +38,7 @@ public static SqlExpression NpgsqlTypeOperatorEquality(SqlExpression left, SqlEx
3638 {
3739 ArgumentValidator . EnsureArgumentNotNull ( left , "left" ) ;
3840 ArgumentValidator . EnsureArgumentNotNull ( right , "right" ) ;
39- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlTypeOperatorEquality , left , right ) ;
41+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlTypeOperatorEquality , left , right ) ;
4042 }
4143
4244 #region NpgsqlPoint
@@ -48,7 +50,7 @@ public static SqlExpression NpgsqlPointConstructor(SqlExpression x, SqlExpressio
4850 {
4951 ArgumentValidator . EnsureArgumentNotNull ( x , "x" ) ;
5052 ArgumentValidator . EnsureArgumentNotNull ( y , "y" ) ;
51- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPointConstructor , x , y ) ;
53+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPointConstructor , x , y ) ;
5254 }
5355
5456 /// <summary>
@@ -57,7 +59,7 @@ public static SqlExpression NpgsqlPointConstructor(SqlExpression x, SqlExpressio
5759 public static SqlExpression NpgsqlPointExtractX ( SqlExpression operand )
5860 {
5961 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
60- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPointExtractX , operand ) ;
62+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPointExtractX , operand ) ;
6163 }
6264
6365 /// <summary>
@@ -66,7 +68,7 @@ public static SqlExpression NpgsqlPointExtractX(SqlExpression operand)
6668 public static SqlExpression NpgsqlPointExtractY ( SqlExpression operand )
6769 {
6870 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
69- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPointExtractY , operand ) ;
71+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPointExtractY , operand ) ;
7072 }
7173
7274 #endregion
@@ -82,7 +84,7 @@ public static SqlExpression NpgsqlBoxConstructor(SqlExpression upperRight, SqlEx
8284 {
8385 ArgumentValidator . EnsureArgumentNotNull ( upperRight , "upperRight" ) ;
8486 ArgumentValidator . EnsureArgumentNotNull ( lowerLeft , "lowerLeft" ) ;
85- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlBoxConstructor , upperRight , lowerLeft ) ;
87+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlBoxConstructor , upperRight , lowerLeft ) ;
8688 }
8789
8890 /// <summary>
@@ -91,7 +93,7 @@ public static SqlExpression NpgsqlBoxConstructor(SqlExpression upperRight, SqlEx
9193 public static SqlExpression NpgsqlBoxExtractHeight ( SqlExpression operand )
9294 {
9395 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
94- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlBoxExtractHeight , operand ) ;
96+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlBoxExtractHeight , operand ) ;
9597 }
9698
9799 /// <summary>
@@ -100,7 +102,7 @@ public static SqlExpression NpgsqlBoxExtractHeight(SqlExpression operand)
100102 public static SqlExpression NpgsqlBoxExtractWidth ( SqlExpression operand )
101103 {
102104 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
103- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlBoxExtractWidth , operand ) ;
105+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlBoxExtractWidth , operand ) ;
104106 }
105107
106108 #endregion
@@ -117,7 +119,7 @@ public static SqlExpression NpgsqlCircleConstructor(SqlExpression center, SqlExp
117119 {
118120 ArgumentValidator . EnsureArgumentNotNull ( center , "center" ) ;
119121 ArgumentValidator . EnsureArgumentNotNull ( radius , "radius" ) ;
120- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlCircleConstructor , center , radius ) ;
122+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlCircleConstructor , center , radius ) ;
121123 }
122124
123125 /// <summary>
@@ -127,7 +129,7 @@ public static SqlExpression NpgsqlCircleConstructor(SqlExpression center, SqlExp
127129 public static SqlExpression NpgsqlCircleExtractCenter ( SqlExpression operand )
128130 {
129131 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
130- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlCircleExtractCenter , operand ) ;
132+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlCircleExtractCenter , operand ) ;
131133 }
132134
133135 /// <summary>
@@ -137,7 +139,7 @@ public static SqlExpression NpgsqlCircleExtractCenter(SqlExpression operand)
137139 public static SqlExpression NpgsqlCircleExtractRadius ( SqlExpression operand )
138140 {
139141 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
140- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlCircleExtractRadius , operand ) ;
142+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlCircleExtractRadius , operand ) ;
141143 }
142144
143145 #endregion
@@ -153,7 +155,7 @@ public static SqlExpression NpgsqlLSegConstructor(SqlExpression start, SqlExpres
153155 {
154156 ArgumentValidator . EnsureArgumentNotNull ( start , "start" ) ;
155157 ArgumentValidator . EnsureArgumentNotNull ( end , "end" ) ;
156- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlLSegConstructor , start , end ) ;
158+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlLSegConstructor , start , end ) ;
157159 }
158160
159161 #endregion
@@ -167,7 +169,7 @@ public static SqlExpression NpgsqlLSegConstructor(SqlExpression start, SqlExpres
167169 public static SqlExpression NpgsqlPathAndPolygonCount ( SqlExpression operand )
168170 {
169171 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
170- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPathAndPolygonCount , operand ) ;
172+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPathAndPolygonCount , operand ) ;
171173 }
172174
173175 /// <summary>
@@ -177,7 +179,7 @@ public static SqlExpression NpgsqlPathAndPolygonCount(SqlExpression operand)
177179 public static SqlExpression NpgsqlPathAndPolygonOpen ( SqlExpression operand )
178180 {
179181 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
180- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPathAndPolygonOpen , operand ) ;
182+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPathAndPolygonOpen , operand ) ;
181183 }
182184
183185 /// <summary>
@@ -188,7 +190,7 @@ public static SqlExpression NpgsqlPathAndPolygonContains(SqlExpression operand,
188190 {
189191 ArgumentValidator . EnsureArgumentNotNull ( operand , "operand" ) ;
190192 ArgumentValidator . EnsureArgumentNotNull ( point , "point" ) ;
191- return new SqlCustomFunctionCall ( PostgresqlSqlGeometricFunctionType . NpgsqlPathAndPolygonContains , operand , point ) ;
193+ return new SqlCustomFunctionCall ( PostgresqlSqlFunctionType . NpgsqlPathAndPolygonContains , operand , point ) ;
192194 }
193195
194196 #endregion
0 commit comments