You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- originalSELECT CASE 1
WHEN 1 THEN
'one'
WHEN 2 THEN
'two'
ELSE
'more'
END;
-- formattedSELECT CASE
1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'more'
END;
CASE statement:
-- original
CREATE PROCEDURE p()
BEGIN
DECLARE
v INT DEFAULT 1;
CASE v
WHEN 2 THEN
SELECT v;
WHEN 3 THEN
SELECT0;
ELSE
BEGIN
END;
END CASE;
END;
-- formatted
CREATE PROCEDURE p()
BEGIN
DECLARE
v INT DEFAULT 1; CASE v WHEN 2 THEN
SELECT
v; WHEN 3 THEN
SELECT0; ELSE
BEGIN
END
;
END CASE;
END;
The text was updated successfully, but these errors were encountered:
Formatter doesn't handle CASE expressions and CASE statements.
Related to #272.
Examples:
CASE expression:
CASE statement:
The text was updated successfully, but these errors were encountered: