It has been a long time since I wrote a ColdFusion Builder extension, but as I'm using it more and more (with the new 3.0 release), I came across a need to write one today. One of the older features that I've used quite a bit is the table view in the RDS panel. This lets you select a table, right click, and dump the data into a new tab. Sure I can do this with other tools, but having it in my IDE is nice.
Unfortunately, this feature has been plagued by a bug (now four years old) that prevents it from working sometimes. Screw that. CFB's extension API lets you integrate with the RDS tables. I wrote an extension that simply lets you right click on a table and select dump:
It then fires up a view with a simple dump of the top 200 rows.
And that's it. I'm considering making it more intelligent so that you can right click on a particular field and it shows just that field. That will take about five minutes but I'm not in the mood to do it right now. ;)
The extension is attached to this blog entry. Enjoy.
P.S. I fixed it so you can select a field and see just that one.
Archived Comments
Right, Don’t want to polemic (about editors),
But as I still using the OLD Homesite,
I can view all of these in my RDS, and that’s great.(db, tables, structures, data, run a query)
Sometimes, old tools are simpler and full of basic great features.
Pierre.
As good as HomeSite was, I just can't see how you would use an editor not updated in what - 10 years? Heck - no language support for recent CF versions, or even HTML/JS?
Got the answer from Ray on twitter, need to make sure I use the @raymondcamden twitter account, but wanted to post my question here to help others out.
So this seems like a cool extension so wanted to know will this work for Bulider 2.1? I figured it would, but since i have not looked into what might have been updated for builder 3, not sure if any of the extension parts of builder may have been updated and only work for 3.0.
Ray says it is backwards compatible to 2.1...hope this helps others. Now off to try it, thanks Ray.
In fact, I think that is actually my bug, Ray! Good to know Adobe's CF dev team is still committed to quality and listening to its users (/sarcasm). Seriously what a joke. At least hide the menu item if it's broken - it doesn't take that much effort.
Very useful extension. Thank you. Any plans to modify this to allow the user to enter the number of records to return?
I considered it. But it seems (imo!) that the primary use for this is to get a "feel" for the data, not for searching or seeing *all* the data. I'm willing to be convinced otherwise though.
I agree. I have some large data sets and sometimes 200 is too much. I actually wanted a way to go to 1-200 (current) and not to use it to dump all records or search records. I will manually change it to 10 or 20. Thank you again.
Side question: I also used the broken RDS thing to do some ad hoq queries at times. You can do that now if you right click in a cfquery block - this fires up a new SQL view that works fine - but I don't always *have* a cfquery block. Also - I don't see myself doing much cfquery blocks now that writing queries in cfscript is so much easier. I may add a new option to let you write your own sql. Useful?
First, thank you for the tip on right clicking on the query block. Personally, I plan to move towards script version as well and would find this feature very useful.
I just tested. If you right click in queryExecute and launch the sql editor, it does NOT pick up the current SQL.