Ok, so a couple months ago I asked the list
(http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:52544)
if anyone knew of any functions to color code a string of SQL for
display.

I got crickets back, so I finally got around to trying my hand at it.  I
figured to be fair; I would post it here in case:

1) Anyone wanted the same functionality

2) Anyone wanted to shred my code 

 

I will say it doesn't perform too badly with a decent sized piece of
code, but when I pasted in a stored proc which was over 1800 lines of
code, it took a few seconds to crank through it.

I initially debated whether or not I should do a series of regex
replacements, or iterate over each token in the string and deal with
them one at a time.  I chose the latter mostly because I am not very
good at regular expressions, but I would like to attempt the former
approach for a speed comparison.

 

http://www.bradwood.com/sql_color_coding/

 

Please check it out and offer me some constructive criticism.  (I'm
already sorry I asked)

 

Thanks.


~Brad

 

P.S.  The closest thing I was able to find on the 'net was
http://jspwiki.org/wiki/ColorCodePlugin_page, but it is all in Java
which mostly just confused me.  :-)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286643
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to