mgoricki / apex-plugin-code-editor

APEX Plugin - Code Editor (CodeMirror)
MIT License
8 stars 0 forks source link

Add button for validating sql queries #3

Open yevon opened 4 years ago

yevon commented 4 years ago

It would be awesome adding a button for validating SQL queries, you could do it like this:

declare l_i_cursor_id INTEGER; begin
l_i_cursor_id:=dbms_sql.open_cursor; dbms_sql.parse(l_i_cursor_id, REGEXP_REPLACE(:P25_SQL_QUERY, ':\w+', 'null'), dbms_sql.native); dbms_sql.close_cursor(l_i_cursor_id);
:P25_ERROR_MESSAGE := 'OK'; return true; exception when others then :P25_ERROR_MESSAGE := DBMS_UTILITY.FORMAT_ERROR_STACK || '
'; return false; end;

image

Similar to the image, adding a validate button into the toolbar

mgoricki commented 4 years ago

I did preparation for this but never finished it. I hope that I'll find some time for this.