X

An Oracle blog about NetBeans for PHP

SQL code completion improved

Guest Author

Today, I would like to show you some improvements done in SQL code completion area (thanks to our colleagues from database team!).

As you probably know, there is already SQL code completion in PHP editor available - but only for SELECT statement. But this has changed recently, now you can enjoy this great feature for INSERT, UPDATE and DELETE statements as well (please note that code completion works for other SQL keywords as well, but not for the first statement in the string - you have to type INSERT/UPDATE/DELETE yourself).

Let's have a look at some screenshots, first for INSERT statement:

SQL code completion for INSERT

SQL code completion for INSERT

SQL code completion for INSERT

Code completion for UPDATE statement works very similarly:

SQL code completion for UPDATE

SQL code completion for UPDATE

SQL code completion for UPDATE

Last, but not leaset, the DELETE statement:

SQL code completion for DELETE

SQL code completion for DELETE

That's all for today, as always, please test it
and report all the issues or enhancements you find in NetBeans IssueZilla
(component php, subcomponent editor).

Join the discussion

Comments ( 9 )
  • Tom Thursday, October 29, 2009

    Wow, great feature. I will check it out.

    However, I haven't used it in practice yet. We utilize an XPath-style query-generator. Just like this:

    $db->insert("Animal.\*", array("ANIMALNAME" => "dog));

    // sends: Insert into Animal(animalname) VALUES ('dog')

    or even:

    $address = $db->select("Animal.dog.customer.address");

    // sends: SELECT CustomerData.address from Animal inner join CustomerData on CustomerData.id = Animal.customer where Animal.id = 'dog'

    (where Animal.customer is a foreign-key to CustomerData.id)

    I appreciate the feature, even though we currently just use it to browse the database.

    However: I would really like to export the reverse-engineered database structure in NetBeans to a XML document. That would be great!

    This info could be converted via XSLT to just about every format and we (and possibly other users) could use it as input to feed our applications and code-generators with structure information.

    Just think of it for a while: you could use it to implement Rapid-Prototyping as a NetBeans-extension. Wouldn't that be cool as well - what you think?


  • Tomas Mysik Friday, October 30, 2009

    To Tom:

    First, thanks for your feedback!

    What you want is not task for PHP team, please, submit an enhancement for Databases (URL can be found in the blog post). Thanks.


  • Tom Friday, October 30, 2009

    Thank you - I will add an issue :-)


  • llonden Saturday, October 31, 2009

    When I download the latest test builds, do I extract the zip file in my current netbeans directory?


  • Tomas Mysik Monday, November 2, 2009

    To llonden:

    Usually, it is better to start with an empty directory.


  • ReynierPM Tuesday, November 3, 2009

    I'm using NetBeans 6.8B. How I can use this new improvements at PHP plugin? How I'll proceed to install it? Where to download the latest build nigthly?


  • Tom Wednesday, November 4, 2009

    @ReynierPM

    Interesting point. Maybe someone could make a webcast / video-tutorial? It's not that difficult at all.

    If you don't already have software for this, I suggest the free "Wink" (http://www.debugmode.com/wink) for video tutorials (Windows and Linux). It supports text comments (so you don't need a mic) and may export recorded video to Shockwave files.

    Recording a tutorial is easy: just hit the record button, do whatever you would have done anyway. Stop recording, optionally add comments and export your video as SWF. That's all. 10-30 minutes top.


  • Tom Wednesday, November 4, 2009

    @ReynierPM

    Oh, hold on a sec. - I just found this screen-cast plus related articles (dating to Aug 2009). Maybe this might be just what you were looking for:

    http://blogs.sun.com/netbeansphp/entry/screencast_declaring_variables_in_comment


  • Tomas Mysik Thursday, November 5, 2009

    To ReynierPM:

    The link is in the blog post, as always (search for "test it").


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.