#2592 # for comments in .sql (transact-sql) mode

open
nobody
None
5
2006-07-31
2006-07-31
Esad Hajdarevic
No

Hi!

I edit MySQL dumps a lot and they containg #-comments,
that are not recognized by the mode. I'm not sure
whether the #-comment is SQL99 standard, but it would
be nice to include it too, I don't think it will break
anything?

Discussion


  • Anonymous
    2010-04-15

    I can confirm this behaviour. # are allowed as comments in mysql and I would also like this fix should be made. Although I can understand this being low priority... it would just be a bit of polish if it's easy to fix.

     

  • Anonymous
    2010-04-15

    It would be great if the DTD schema for edit modes (i.e. xmode.dtd) allowed more than one 'lineComment'. So for example this outstanding bug regarding mysql syntax highlighting could be fixed by changing the current mysql.xml <PROPS> section from:

    <PROPS>
    <PROPERTY NAME="commentStart" VALUE="/*" />
    <PROPERTY NAME="commentEnd" VALUE="*/" />
    <PROPERTY NAME="lineComment" VALUE="--" />
    </PROPS>

    to:

    <PROPS>
    <PROPERTY NAME="commentStart" VALUE="/*" />
    <PROPERTY NAME="commentEnd" VALUE="*/" />
    <PROPERTY NAME="lineComment" VALUE="--" />
    <PROPERTY NAME="lineComment" VALUE="#" />
    </PROPS>

    Am I on the right lines? Also would it not be better to move to a .xsd schema file rather than using the old DTD method? It is much stricter at validation which would ensure greater quality for the syntax highlighting functionality.

     
  • Steve Jakob
    Steve Jakob
    2010-04-15

    Transact-SQL is the dialect of SQL used by MS SQL*Server (and Sybase IIRC). In transact-SQL the "#" character is not a valid comment delimiter.

    I notice that there is a mySQL mode available in jEdit. Is this not appropriate?

     
  • Lummo
    Lummo
    2013-09-23

    Changing:
    <SPAN TYPE="COMMENT1">
    <BEGIN>/*</BEGIN>
    <END>*/</END>
    </SPAN>
    to
    <EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
    <SPAN TYPE="COMMENT2">
    <BEGIN>/*</BEGIN>
    <END>*/</END>
    </SPAN>

    worked for me.