From 650b632f4f18acbc54de7e44d3c4d9a06bd7a88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delaporte?= Date: Wed, 7 Mar 2018 15:33:23 +0100 Subject: [PATCH 1/3] Fix truncate registration. * Support single parameter truncate, like round. * Add PostgreSQL truncate * Fix Sybase Anywhere round which was not supporting single parameter calls either. --- src/NHibernate.Test/Hql/HQLFunctions.cs | 59 +++++++++++++++++++ .../Dialect/Function/RoundFunction.cs | 19 ++++-- src/NHibernate/Dialect/MsSql2000Dialect.cs | 26 +++++++- src/NHibernate/Dialect/MsSqlCeDialect.cs | 4 +- src/NHibernate/Dialect/MySQLDialect.cs | 2 +- src/NHibernate/Dialect/PostgreSQLDialect.cs | 32 ++++++++-- .../Dialect/SybaseSQLAnywhere10Dialect.cs | 7 +-- 7 files changed, 132 insertions(+), 17 deletions(-) diff --git a/src/NHibernate.Test/Hql/HQLFunctions.cs b/src/NHibernate.Test/Hql/HQLFunctions.cs index d9845162689..2d54fc6ebaf 100644 --- a/src/NHibernate.Test/Hql/HQLFunctions.cs +++ b/src/NHibernate.Test/Hql/HQLFunctions.cs @@ -568,6 +568,65 @@ public void Round() } } + [Test] + public void Truncate() + { + AssumeFunctionSupported("truncate"); + + using (var s = OpenSession()) + { + var a1 = new Animal("a1", 1.87f); + s.Save(a1); + var m1 = new MaterialResource("m1", "18", MaterialResource.MaterialState.Available) { Cost = 51.76m }; + s.Save(m1); + s.Flush(); + } + using (var s = OpenSession()) + { + var roundF = s.CreateQuery("select truncate(a.BodyWeight) from Animal a").UniqueResult(); + Assert.That(roundF, Is.EqualTo(1), "Selecting truncate(double) failed."); + var countF = + s + .CreateQuery("select count(*) from Animal a where truncate(a.BodyWeight) = :c") + .SetInt32("c", 1) + .UniqueResult(); + Assert.That(countF, Is.EqualTo(1), "Filtering truncate(double) failed."); + + roundF = s.CreateQuery("select truncate(a.BodyWeight, 1) from Animal a").UniqueResult(); + Assert.That(roundF, Is.EqualTo(1.8f).Within(0.01f), "Selecting truncate(double, 1) failed."); + countF = + s + .CreateQuery("select count(*) from Animal a where truncate(a.BodyWeight, 1) between :c1 and :c2") + .SetDouble("c1", 1.79) + .SetDouble("c2", 1.81) + .UniqueResult(); + Assert.That(countF, Is.EqualTo(1), "Filtering truncate(double, 1) failed."); + + var roundD = s.CreateQuery("select truncate(m.Cost) from MaterialResource m").UniqueResult(); + Assert.That(roundD, Is.EqualTo(51), "Selecting truncate(decimal) failed."); + var count = + s + .CreateQuery("select count(*) from MaterialResource m where truncate(m.Cost) = :c") + .SetInt32("c", 51) + .UniqueResult(); + Assert.That(count, Is.EqualTo(1), "Filtering truncate(decimal) failed."); + + roundD = s.CreateQuery("select truncate(m.Cost, 1) from MaterialResource m").UniqueResult(); + Assert.That(roundD, Is.EqualTo(51.7m), "Selecting truncate(decimal, 1) failed."); + + if (TestDialect.HasBrokenDecimalType) + // SQLite fails the equality test due to using double instead, wich requires a tolerance. + return; + + count = + s + .CreateQuery("select count(*) from MaterialResource m where truncate(m.Cost, 1) = :c") + .SetDecimal("c", 51.7m) + .UniqueResult(); + Assert.That(count, Is.EqualTo(1), "Filtering truncate(decimal, 1) failed."); + } + } + [Test] public void Mod() { diff --git a/src/NHibernate/Dialect/Function/RoundFunction.cs b/src/NHibernate/Dialect/Function/RoundFunction.cs index 58e7c203208..2a59a404ebd 100644 --- a/src/NHibernate/Dialect/Function/RoundFunction.cs +++ b/src/NHibernate/Dialect/Function/RoundFunction.cs @@ -12,9 +12,20 @@ namespace NHibernate.Dialect.Function [Serializable] public class RoundEmulatingSingleParameterFunction : ISQLFunction { - private static readonly ISQLFunction SingleParamRound = new SQLFunctionTemplate(null, "round(?1, 0)"); + private readonly ISQLFunction _singleParamRound; + private readonly ISQLFunction _round; + private readonly string _name; - private static readonly ISQLFunction Round = new StandardSQLFunction("round"); + /// + /// Constructs a RoundEmulatingSingleParameterFunction. + /// + /// The SQL name of the round function to call. + public RoundEmulatingSingleParameterFunction(string name) + { + _singleParamRound = new SQLFunctionTemplate(null, $"{name}(?1, 0)"); + _round = new StandardSQLFunction(name); + _name = name; + } public IType ReturnType(IType columnType, IMapping mapping) => columnType; @@ -24,9 +35,9 @@ public class RoundEmulatingSingleParameterFunction : ISQLFunction public SqlString Render(IList args, ISessionFactoryImplementor factory) { - return args.Count == 1 ? SingleParamRound.Render(args, factory) : Round.Render(args, factory); + return args.Count == 1 ? _singleParamRound.Render(args, factory) : _round.Render(args, factory); } - public override string ToString() => "round"; + public override string ToString() => _name; } } diff --git a/src/NHibernate/Dialect/MsSql2000Dialect.cs b/src/NHibernate/Dialect/MsSql2000Dialect.cs index 3553d5923a6..92c94c1dcbd 100644 --- a/src/NHibernate/Dialect/MsSql2000Dialect.cs +++ b/src/NHibernate/Dialect/MsSql2000Dialect.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.Common; @@ -286,8 +287,8 @@ protected virtual void RegisterFunctions() RegisterFunction("ceiling", new StandardSQLFunction("ceiling")); RegisterFunction("ceil", new StandardSQLFunction("ceiling")); RegisterFunction("floor", new StandardSQLFunction("floor")); - RegisterFunction("round", new RoundEmulatingSingleParameterFunction()); - RegisterFunction("truncate", new SQLFunctionTemplate(null, "round(?1, ?2, 1)")); + RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); + RegisterFunction("truncate", new TruncateFunction()); RegisterFunction("power", new StandardSQLFunction("power", NHibernateUtil.Double)); @@ -811,5 +812,26 @@ private string ReplaceMatch(Match match) return string.Concat(" ", lockHint, match.Groups[2].Value); // TODO: seems like this line is redundant } } + + [Serializable] + internal class TruncateFunction : ISQLFunction + { + private static readonly ISQLFunction Truncate = new SQLFunctionTemplate(null, "round(?1, 0, 1)"); + + private static readonly ISQLFunction TruncateWith2Params = new SQLFunctionTemplate(null, "round(?1, ?2, 1)"); + + public IType ReturnType(IType columnType, IMapping mapping) => columnType; + + public bool HasArguments => true; + + public bool HasParenthesesIfNoArguments => true; + + public SqlString Render(IList args, ISessionFactoryImplementor factory) + { + return args.Count == 1 ? Truncate.Render(args, factory) : TruncateWith2Params.Render(args, factory); + } + + public override string ToString() => "truncate"; + } } } diff --git a/src/NHibernate/Dialect/MsSqlCeDialect.cs b/src/NHibernate/Dialect/MsSqlCeDialect.cs index 3aebc47e5e3..4ffe6170e52 100644 --- a/src/NHibernate/Dialect/MsSqlCeDialect.cs +++ b/src/NHibernate/Dialect/MsSqlCeDialect.cs @@ -194,8 +194,8 @@ protected virtual void RegisterFunctions() RegisterFunction("concat", new VarArgsSQLFunction(NHibernateUtil.String, "(", "+", ")")); RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); - RegisterFunction("round", new RoundEmulatingSingleParameterFunction()); - RegisterFunction("truncate", new SQLFunctionTemplate(null, "round(?1, ?2, 1)")); + RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); + RegisterFunction("truncate", new MsSql2000Dialect.TruncateFunction()); RegisterFunction("bit_length", new SQLFunctionTemplate(NHibernateUtil.Int32, "datalength(?1) * 8")); RegisterFunction("extract", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(?1, ?3)")); diff --git a/src/NHibernate/Dialect/MySQLDialect.cs b/src/NHibernate/Dialect/MySQLDialect.cs index 3292dabaffd..be6f01aa5e9 100644 --- a/src/NHibernate/Dialect/MySQLDialect.cs +++ b/src/NHibernate/Dialect/MySQLDialect.cs @@ -261,7 +261,7 @@ protected virtual void RegisterFunctions() RegisterFunction("ceiling", new StandardSQLFunction("ceiling")); RegisterFunction("floor", new StandardSQLFunction("floor")); RegisterFunction("round", new StandardSQLFunction("round")); - RegisterFunction("truncate", new StandardSafeSQLFunction("truncate", 2)); + RegisterFunction("truncate", new RoundEmulatingSingleParameterFunction("truncate")); RegisterFunction("rand", new NoArgSQLFunction("rand", NHibernateUtil.Double)); diff --git a/src/NHibernate/Dialect/PostgreSQLDialect.cs b/src/NHibernate/Dialect/PostgreSQLDialect.cs index 33510e20378..70169cc14fb 100644 --- a/src/NHibernate/Dialect/PostgreSQLDialect.cs +++ b/src/NHibernate/Dialect/PostgreSQLDialect.cs @@ -69,7 +69,9 @@ public PostgreSQLDialect() RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); RegisterFunction("sign", new StandardSQLFunction("sign", NHibernateUtil.Int32)); - RegisterFunction("round", new RoundFunction()); + RegisterFunction("round", new RoundFunction(false)); + RegisterFunction("truncate", new RoundFunction(true)); + RegisterFunction("trunc", new RoundFunction(true)); // Trigonometric functions. RegisterFunction("acos", new StandardSQLFunction("acos", NHibernateUtil.Double)); @@ -322,12 +324,34 @@ public override string CurrentTimestampSelectString private class RoundFunction : ISQLFunction { private static readonly ISQLFunction Round = new StandardSQLFunction("round"); + private static readonly ISQLFunction Truncate = new StandardSQLFunction("trunc"); - // PostgreSQL round with two arguments only accepts decimal as input, thus the cast. + // PostgreSQL round/trunc with two arguments only accepts decimal as input, thus the cast. // It also yields only decimal, but for emulating similar behavior to other databases, we need // to have it converted to the original input type, which will be done by NHibernate thanks to // not specifying the function type. private static readonly ISQLFunction RoundWith2Params = new SQLFunctionTemplate(null, "round(cast(?1 as numeric), ?2)"); + private static readonly ISQLFunction TruncateWith2Params = new SQLFunctionTemplate(null, "trunc(cast(?1 as numeric), ?2)"); + + private readonly ISQLFunction _singleParamFunction; + private readonly ISQLFunction _twoParamFunction; + private readonly string _name; + + public RoundFunction(bool truncate) + { + if (truncate) + { + _singleParamFunction = Truncate; + _twoParamFunction = TruncateWith2Params; + _name = "truncate"; + } + else + { + _singleParamFunction = Round; + _twoParamFunction = RoundWith2Params; + _name = "round"; + } + } public IType ReturnType(IType columnType, IMapping mapping) => columnType; @@ -337,10 +361,10 @@ private class RoundFunction : ISQLFunction public SqlString Render(IList args, ISessionFactoryImplementor factory) { - return args.Count == 2 ? RoundWith2Params.Render(args, factory) : Round.Render(args, factory); + return args.Count == 2 ? _twoParamFunction.Render(args, factory) : _singleParamFunction.Render(args, factory); } - public override string ToString() => "round"; + public override string ToString() => _name; } } } diff --git a/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs b/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs index 09f8c6491b6..8ee5e977e9e 100644 --- a/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs +++ b/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs @@ -140,12 +140,13 @@ protected virtual void RegisterMathFunctions() RegisterFunction("radians", new StandardSQLFunction("radians", NHibernateUtil.Double)); RegisterFunction("rand", new StandardSQLFunction("rand", NHibernateUtil.Double)); RegisterFunction("remainder", new StandardSQLFunction("remainder")); - RegisterFunction("round", new StandardSQLFunction("round")); + RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); RegisterFunction("sign", new StandardSQLFunction("sign", NHibernateUtil.Int32)); RegisterFunction("sin", new StandardSQLFunction("sin", NHibernateUtil.Double)); RegisterFunction("sqrt", new StandardSQLFunction("sqrt", NHibernateUtil.Double)); RegisterFunction("tan", new StandardSQLFunction("tan", NHibernateUtil.Double)); - RegisterFunction("truncate", new StandardSQLFunction("truncate")); + RegisterFunction("truncnum", new RoundEmulatingSingleParameterFunction("truncnum")); + RegisterFunction("truncate", new RoundEmulatingSingleParameterFunction("truncnum")); } protected virtual void RegisterXmlFunctions() @@ -343,8 +344,6 @@ protected virtual void RegisterMiscellaneousFunctions() RegisterFunction("transactsql", new StandardSQLFunction("transactsql", NHibernateUtil.String)); RegisterFunction("varexists", new StandardSQLFunction("varexists", NHibernateUtil.Int32)); RegisterFunction("watcomsql", new StandardSQLFunction("watcomsql", NHibernateUtil.String)); - RegisterFunction("truncnum", new StandardSafeSQLFunction("truncnum", 2)); - RegisterFunction("truncate", new StandardSafeSQLFunction("truncnum", 2)); } #region private static readonly string[] DialectKeywords = { ... } From 29807f0fab092a38d93d91331adec3e5550144c9 Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Fri, 9 Mar 2018 12:59:06 +1300 Subject: [PATCH 2/3] Introduce StandardSQLFunctionWithRequiredParameters --- .../Dialect/Function/RoundFunction.cs | 43 ------------------- ...andardSQLFunctionWithRequiredParameters.cs | 42 ++++++++++++++++++ src/NHibernate/Dialect/MsSql2000Dialect.cs | 26 +---------- src/NHibernate/Dialect/MsSqlCeDialect.cs | 4 +- src/NHibernate/Dialect/MySQLDialect.cs | 2 +- .../Dialect/SybaseSQLAnywhere10Dialect.cs | 6 +-- 6 files changed, 50 insertions(+), 73 deletions(-) delete mode 100644 src/NHibernate/Dialect/Function/RoundFunction.cs create mode 100644 src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs diff --git a/src/NHibernate/Dialect/Function/RoundFunction.cs b/src/NHibernate/Dialect/Function/RoundFunction.cs deleted file mode 100644 index 2a59a404ebd..00000000000 --- a/src/NHibernate/Dialect/Function/RoundFunction.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections; -using NHibernate.Engine; -using NHibernate.SqlCommand; -using NHibernate.Type; -using System; - -namespace NHibernate.Dialect.Function -{ - /// - /// Provides a round implementation that supports single parameter round by translating to two parameters round. - /// - [Serializable] - public class RoundEmulatingSingleParameterFunction : ISQLFunction - { - private readonly ISQLFunction _singleParamRound; - private readonly ISQLFunction _round; - private readonly string _name; - - /// - /// Constructs a RoundEmulatingSingleParameterFunction. - /// - /// The SQL name of the round function to call. - public RoundEmulatingSingleParameterFunction(string name) - { - _singleParamRound = new SQLFunctionTemplate(null, $"{name}(?1, 0)"); - _round = new StandardSQLFunction(name); - _name = name; - } - - public IType ReturnType(IType columnType, IMapping mapping) => columnType; - - public bool HasArguments => true; - - public bool HasParenthesesIfNoArguments => true; - - public SqlString Render(IList args, ISessionFactoryImplementor factory) - { - return args.Count == 1 ? _singleParamRound.Render(args, factory) : _round.Render(args, factory); - } - - public override string ToString() => _name; - } -} diff --git a/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs b/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs new file mode 100644 index 00000000000..7e3361c6531 --- /dev/null +++ b/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections; +using System.Linq; +using NHibernate.Engine; +using NHibernate.SqlCommand; +using NHibernate.Type; + +namespace NHibernate.Dialect.Function +{ + /// + /// A SQL function which substitutes required missing parametes with defaults. + /// + [Serializable] + internal class StandardSQLFunctionWithRequiredParameters : StandardSQLFunction + { + private readonly object[] _requiredArgs; + + /// + public StandardSQLFunctionWithRequiredParameters(string name, object[] requiredArgs) + : base(name) + { + _requiredArgs = requiredArgs; + } + + /// + public StandardSQLFunctionWithRequiredParameters(string name, IType typeValue, object[] requiredArgs) + : base(name, typeValue) + { + _requiredArgs = requiredArgs; + } + + /// + public override SqlString Render(IList args, ISessionFactoryImplementor factory) + { + var combinedArgs = + args.Cast() + .Concat(_requiredArgs.Skip(args.Count)) + .ToArray(); + return base.Render(combinedArgs, factory); + } + } +} \ No newline at end of file diff --git a/src/NHibernate/Dialect/MsSql2000Dialect.cs b/src/NHibernate/Dialect/MsSql2000Dialect.cs index 92c94c1dcbd..25d973c66b6 100644 --- a/src/NHibernate/Dialect/MsSql2000Dialect.cs +++ b/src/NHibernate/Dialect/MsSql2000Dialect.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.Common; @@ -287,8 +286,8 @@ protected virtual void RegisterFunctions() RegisterFunction("ceiling", new StandardSQLFunction("ceiling")); RegisterFunction("ceil", new StandardSQLFunction("ceiling")); RegisterFunction("floor", new StandardSQLFunction("floor")); - RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); - RegisterFunction("truncate", new TruncateFunction()); + RegisterFunction("round", new StandardSQLFunctionWithRequiredParameters("round", new object[] {null, "0"})); + RegisterFunction("truncate", new StandardSQLFunctionWithRequiredParameters("round", new object[] {null, "0", "1"})); RegisterFunction("power", new StandardSQLFunction("power", NHibernateUtil.Double)); @@ -812,26 +811,5 @@ private string ReplaceMatch(Match match) return string.Concat(" ", lockHint, match.Groups[2].Value); // TODO: seems like this line is redundant } } - - [Serializable] - internal class TruncateFunction : ISQLFunction - { - private static readonly ISQLFunction Truncate = new SQLFunctionTemplate(null, "round(?1, 0, 1)"); - - private static readonly ISQLFunction TruncateWith2Params = new SQLFunctionTemplate(null, "round(?1, ?2, 1)"); - - public IType ReturnType(IType columnType, IMapping mapping) => columnType; - - public bool HasArguments => true; - - public bool HasParenthesesIfNoArguments => true; - - public SqlString Render(IList args, ISessionFactoryImplementor factory) - { - return args.Count == 1 ? Truncate.Render(args, factory) : TruncateWith2Params.Render(args, factory); - } - - public override string ToString() => "truncate"; - } } } diff --git a/src/NHibernate/Dialect/MsSqlCeDialect.cs b/src/NHibernate/Dialect/MsSqlCeDialect.cs index 4ffe6170e52..6feb7b0c889 100644 --- a/src/NHibernate/Dialect/MsSqlCeDialect.cs +++ b/src/NHibernate/Dialect/MsSqlCeDialect.cs @@ -194,8 +194,8 @@ protected virtual void RegisterFunctions() RegisterFunction("concat", new VarArgsSQLFunction(NHibernateUtil.String, "(", "+", ")")); RegisterFunction("mod", new SQLFunctionTemplate(NHibernateUtil.Int32, "((?1) % (?2))")); - RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); - RegisterFunction("truncate", new MsSql2000Dialect.TruncateFunction()); + RegisterFunction("round", new StandardSQLFunctionWithRequiredParameters("round", new object[] {null, "0"})); + RegisterFunction("truncate", new StandardSQLFunctionWithRequiredParameters("round", new object[] {null, "0", "1"})); RegisterFunction("bit_length", new SQLFunctionTemplate(NHibernateUtil.Int32, "datalength(?1) * 8")); RegisterFunction("extract", new SQLFunctionTemplate(NHibernateUtil.Int32, "datepart(?1, ?3)")); diff --git a/src/NHibernate/Dialect/MySQLDialect.cs b/src/NHibernate/Dialect/MySQLDialect.cs index be6f01aa5e9..bd76c80adee 100644 --- a/src/NHibernate/Dialect/MySQLDialect.cs +++ b/src/NHibernate/Dialect/MySQLDialect.cs @@ -261,7 +261,7 @@ protected virtual void RegisterFunctions() RegisterFunction("ceiling", new StandardSQLFunction("ceiling")); RegisterFunction("floor", new StandardSQLFunction("floor")); RegisterFunction("round", new StandardSQLFunction("round")); - RegisterFunction("truncate", new RoundEmulatingSingleParameterFunction("truncate")); + RegisterFunction("truncate", new StandardSQLFunctionWithRequiredParameters("truncate", new object[] {null, "0"})); RegisterFunction("rand", new NoArgSQLFunction("rand", NHibernateUtil.Double)); diff --git a/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs b/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs index 8ee5e977e9e..4fe1c0c1faf 100644 --- a/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs +++ b/src/NHibernate/Dialect/SybaseSQLAnywhere10Dialect.cs @@ -140,13 +140,13 @@ protected virtual void RegisterMathFunctions() RegisterFunction("radians", new StandardSQLFunction("radians", NHibernateUtil.Double)); RegisterFunction("rand", new StandardSQLFunction("rand", NHibernateUtil.Double)); RegisterFunction("remainder", new StandardSQLFunction("remainder")); - RegisterFunction("round", new RoundEmulatingSingleParameterFunction("round")); + RegisterFunction("round", new StandardSQLFunctionWithRequiredParameters("round", new object[] {null, "0"})); RegisterFunction("sign", new StandardSQLFunction("sign", NHibernateUtil.Int32)); RegisterFunction("sin", new StandardSQLFunction("sin", NHibernateUtil.Double)); RegisterFunction("sqrt", new StandardSQLFunction("sqrt", NHibernateUtil.Double)); RegisterFunction("tan", new StandardSQLFunction("tan", NHibernateUtil.Double)); - RegisterFunction("truncnum", new RoundEmulatingSingleParameterFunction("truncnum")); - RegisterFunction("truncate", new RoundEmulatingSingleParameterFunction("truncnum")); + RegisterFunction("truncnum", new StandardSQLFunctionWithRequiredParameters("truncnum", new object[] {null, "0"})); + RegisterFunction("truncate", new StandardSQLFunctionWithRequiredParameters("truncnum", new object[] {null, "0"})); } protected virtual void RegisterXmlFunctions() From 42e88164e8aa49e55e43c2c6d2c81ccf1f43d751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delaporte?= Date: Fri, 9 Mar 2018 01:19:28 +0100 Subject: [PATCH 3/3] typo --- .../Function/StandardSQLFunctionWithRequiredParameters.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs b/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs index 7e3361c6531..8f82fb4a8e5 100644 --- a/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs +++ b/src/NHibernate/Dialect/Function/StandardSQLFunctionWithRequiredParameters.cs @@ -8,7 +8,7 @@ namespace NHibernate.Dialect.Function { /// - /// A SQL function which substitutes required missing parametes with defaults. + /// A SQL function which substitutes required missing parameters with defaults. /// [Serializable] internal class StandardSQLFunctionWithRequiredParameters : StandardSQLFunction @@ -39,4 +39,4 @@ public override SqlString Render(IList args, ISessionFactoryImplementor factory) return base.Render(combinedArgs, factory); } } -} \ No newline at end of file +}