Ejemplo n.º 1
0
        private static ProviderType GetSqlType(SqlNode node)
        {
            SqlExpression exp = node as SqlExpression;

            if (exp != null)
            {
                return(exp.SqlType);
            }
            SqlSelect sel = node as SqlSelect;

            if (sel != null)
            {
                return(sel.Selection.SqlType);
            }
            SqlTable tab = node as SqlTable;

            if (tab != null)
            {
                return(tab.SqlRowType);
            }
            SqlUnion su = node as SqlUnion;

            if (su != null)
            {
                return(su.GetSqlType());
            }
            throw Error.UnexpectedNode(node.NodeType);
        }