public override string Translate(SqlCompilerContext context, SqlDeclareCursor node, DeclareCursorSection section)
 {
     if (section == DeclareCursorSection.Holdability || section == DeclareCursorSection.Returnability)
     {
         return(string.Empty);
     }
     return(base.Translate(context, node, section));
 }
        public override string Translate(SqlCompilerContext context, SqlDeclareCursor node, DeclareCursorSection section)
        {
            switch (section)
            {
            case DeclareCursorSection.Entry:
                return("DECLARE " + QuoteIdentifier(node.Cursor.Name));

            case DeclareCursorSection.Sensivity:
                return("");

            case DeclareCursorSection.Scrollability:
                return(node.Cursor.Scroll ? "SCROLL" : "NO SCROLL");

            case DeclareCursorSection.Cursor:
                return("CURSOR");

            case DeclareCursorSection.Holdability:
                return(node.Cursor.WithHold ? "WITH HOLD" : "");

            case DeclareCursorSection.Returnability:
            case DeclareCursorSection.Updatability:
            case DeclareCursorSection.Exit:
                return("");

            case DeclareCursorSection.For:
                return("FOR");
            }
            return(base.Translate(context, node, section));
        }