This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is based on a user feedback: http://blogs.sun.com/netbeansphp/entry/sql_code_completion_in_the#comment-1229425365000
IMHO it's a bug because code completion already works in SQL strings - I don't see any valid reason why we should make difference between SELECT and e.g. UPDATE statements. Am I missing something? Please consider also code completion for SQL keywords themselves (SELECT, FROM, WHERE, ORDER, etc.). Thanks a lot.
Many database libraries allow to compose sql strings step by step. e.g.: $sql = db::query('SELECT * FROM table'); if ($type) $sql->sql('WHERE type = %i' , $type); It would be nice if every string which is started with: [SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT] will be recognize as SQL string.
Or I think up better solution class SomeORM { /** * @param sqlstring $sql # this mean that type of $sql param is SQL string and editor can use code competition for this string function query($sql) { ... } } what do you think about this solution?
Reassigned to new owner.
I guess it were fixed in NB6.8M2
I found one minor issue, otherwise it's excellent! Thanks! To reproduce the issue, open SQL file and put this code in it (I use NB sample DB): INSERT INTO ANIMAL(WEIGHT) VA| <-- no CC here, "VALUES" should be offered If I don't use "(WEIGHT)" part, keyword "VALUES" is completed correctly. The same applies for PHP SQL code completion. Thanks a lot. Product Version: NetBeans IDE Dev (Build 091016) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 System: Linux version 2.6.28-15-generic running on amd64; UTF-8; cs_CZ (nb)
File separate issue 175042.