Raptor SQL Formatter Issue…

 

It looks like there are some outstanding issues with the Raptor SQL formatter. It doesn’t appear to work at all when editing a package, but it will work for a procedure or an SQL statement. When it does work it appears to have some odd ideas about how PL/SQL variables should be defined. This example shows one case:

-- Before
CREATE OR REPLACE PROCEDURE dummy_proc AS
l_dummy_1 dual.dummy%type;
l_dummy_2 dual.dummy%type;
BEGIN
l_dummy_1 := 'x';
DBMS_OUTPUT.PUT_LINE('l_dummy_1=' || l_dummy_1);
l_dummy_2 := 'x';
DBMS_OUTPUT.PUT_LINE('l_dummy_2=' || l_dummy_2);
END;

-- After
CREATE OR REPLACE PROCEDURE dummy_proc AS l_dummy_1 dual.dummy % type;
l_dummy_2 dual.dummy % type;
BEGIN
l_dummy_1 := 'x';
DBMS_OUTPUT.PUT_LINE('l_dummy_1=' || l_dummy_1);
l_dummy_2 := 'x';
DBMS_OUTPUT.PUT_LINE('l_dummy_2=' || l_dummy_2);
END;

It seems to be a little confused by the declaration section of the procedure. I’ve posted this on the support forum. I hope this gets fixed before the production release.

In addition to this, the SQL formatter is a little lacking in configuration options.

Cheers

Tim…

Author: Tim...

DBA, Developer, Author, Trainer.

One thought on “Raptor SQL Formatter Issue…”

  1. It looks like the formater thinks that spaces should go around certain characters – the first time it caught me out was when it expanded ‘=>’ in a call to dbms_stats.xxx to ‘ = > ‘ which of course would not run.

Comments are closed.