Re: [gnome-db] Gnome-DB SQL Window syntax hi-lighting of keywordsRo



On Sat, 2002-03-16 at 17:19, Daniel Morgan wrote:
> Rodrigo,
> 
> I just realized working on the syntax hi-lighting of SQL keywords in the
> Gnome-DB SQL Window also provides the basis for the multiple
> query/single execution feature.
> 
> SELECT *
> FROM SOMETABLE
> WHERE COL1 = 'BLAH'
> AND COL2 = 'UGH' AND COL5 IN ('A','B','C')
> AND (COL3 = 'WHOA' OR COL4 = 'WHAT');
> 
> -- Comment (Do not Run Me please)
> SELECT *
> FROM ANOTHERTABLE
> WHERE COL2 = 'BLEH';
> 
> /*
> SELECT 'Commented, so do not run me please'
> FROM DUAL;
> */
> 
> I assume once that gets done, we can do preferences for it, such as,
> keywords "SELECT", "INSERT", "UPDATE", "DELETE" be BOLD BLUE, while
> "AND", "OR", "NOT" be NORMAL GREEN.  Comments could be gray italicized. 
> Normal text would be black including punctuation.  Single-quoted text
> would be normal red.
> 
wow, this is really cool!

As I told you on IRC, it is a good idea to have a separated
GnomeDbSqlEditor widget which manages all this, and which contains,
let's say:

const gchar *gnome_db_sql_editor_get_current_command (...);
const gchar *gnome_db_sql_editor_get_all_commands (...);

so that we can easily, from the parts using this widget, access the
different strings (current command, all commands, etc) from the widget.

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]