public override SqlExpression VisitCastFunction(PlSqlParser.CastFunctionContext context) { if (context.MULTISET() != null) { throw new NotImplementedException(); } var destType = SqlTypeParser.Parse(context.datatype()); var value = Visit(context.concatenationWrapper()); return(SqlExpression.Cast(value, destType)); }
public override SqlExpression VisitCastFunction(PlSqlParser.CastFunctionContext context) { if (context.MULTISET() != null) { throw new NotImplementedException(); } var destType = SqlTypeParser.Parse(context.datatype()); var destTypeString = destType.ToString(); var value = Visit(context.concatenationWrapper()); return(SqlExpression.FunctionCall("SQL_CAST", new[] { value, SqlExpression.Constant(destTypeString) })); }