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
It seems like no formatting is done for the query between BEGIN and END.
sql = """CREATE FUNCTION a(x VARCHAR(20)) RETURNS VARCHAR(20)
BEGIN
DECLARE y VARCHAR(20);
IF (1 = 1) THEN
SET x = y;
END IF;
RETURN x;
END;
"""
print sqlparse.format(sql, reindent=True,indent_width="4",indent_tabs=True);
When the above is formatted, it simply spits out:
CREATE FUNCTION a(x VARCHAR(20)) RETURNS VARCHAR(20) BEGIN DECLARE y VARCHAR(20); IF (1 = 1) THEN
SET x = y; END IF; RETURN x; END;
While I am expecting something like:
CREATE FUNCTION a(x VARCHAR(20)) RETURNS VARCHAR(20)
BEGIN
DECLARE y VARCHAR(20);
IF (1 = 1) THEN
SET x = y;
END IF;
RETURN x;
END;
The text was updated successfully, but these errors were encountered:
This simplifies codes slightly, removing the need deal with the EOF case explicitly.
The clone kludge in `_ => self.expected("date/time field",
Token::Word(w.clone())))` will become unnecessary once we stop using
a separate match for the keywords, as suggested in
https://github.com/andygrove/sqlparser-rs/pull/193#issuecomment-641607194
It seems like no formatting is done for the query between BEGIN and END.
When the above is formatted, it simply spits out:
While I am expecting something like:
The text was updated successfully, but these errors were encountered: