From fa7def01d00fc7c5c3047b077bc0f1a4cdc1d10a Mon Sep 17 00:00:00 2001 From: Fredy Wijaya Date: Thu, 13 Dec 2018 16:44:29 -0600 Subject: Fix formatting on INSERT (fixes #329) This patch fixes the formatting on INSERT by creating a new instance of sql.Values to group all the values. SQL: insert into foo values (1, 'foo'), (2, 'bar'), (3, 'baz') Before: insert into foo values (1, 'foo'), (2, 'bar'), (3, 'baz') After: insert into foo values (1, 'foo'), (2, 'bar'), (3, 'baz') --- sqlparse/sql.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sqlparse/sql.py') diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 2741e83..1f56117 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -621,3 +621,7 @@ class Begin(TokenList): class Operation(TokenList): """Grouping of operations""" + + +class Values(TokenList): + """Grouping of values""" -- cgit v1.2.1