Skip to content

Commit 01581a0

Browse files
committed
Add postgres-specific function TRIM_SCALE
1 parent 966f716 commit 01581a0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Orm/Xtensive.Orm.PostgreSql/Orm.Providers.PostgreSql/PostgresqlSqlDml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Created: 2014.05.06;
66

77
using Xtensive.Core;
8+
using Xtensive.Sql;
89
using Xtensive.Sql.Dml;
910

1011
namespace Xtensive.Orm.Providers.PostgreSql
@@ -16,6 +17,15 @@ namespace Xtensive.Orm.Providers.PostgreSql
1617
/// </summary>
1718
public class PostgresqlSqlDml
1819
{
20+
/// <summary>
21+
/// Creates expression for native "trim_scale" function call. The function is supported starting from PostgreSQL 13
22+
/// </summary>
23+
public static SqlExpression DecimalTrimScale(SqlExpression operand)
24+
{
25+
ArgumentValidator.EnsureArgumentNotNull(operand, nameof(operand));
26+
return SqlDml.FunctionCall("TRIM_SCALE", operand);
27+
}
28+
1929
#region Spatial types
2030

2131
/// <summary>

0 commit comments

Comments
 (0)