Esempio n. 1
0
        internal static SqlExpression Strftime(this ISqlExpressionFactory factory, Type returnType, string format, SqlExpression timestring, IEnumerable <SqlExpression>?modifiers = null)
        {
            var result = factory.DateFunction("strftime", GetArguments(timestring, modifiers).Insert(0, factory.Constant(format)), timestring.Type);

            if (timestring.Type != returnType)
            {
                result = factory.Convert(result, returnType);
            }
            return(result);
        }
Esempio n. 2
0
 internal static SqlExpression DateTime(this ISqlExpressionFactory factory, Type returnType, SqlExpression timestring, IEnumerable <SqlExpression>?modifiers = null)
 => factory.DateFunction("datetime", GetArguments(timestring, modifiers), returnType);