Skip to content

Commit

Permalink
Fix: Don't wrap set operations in brackets in SQLite
Browse files Browse the repository at this point in the history
SQLite doesn't support set operations with brackets. Luckily there
already exists this flag to disable adding brackets to set operations -
enable for `SQLLiteQueryBuilder`.
  • Loading branch information
nwrahnema committed Sep 6, 2023
1 parent 30574f9 commit 3d13ccd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pypika/dialects.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,12 @@ class SQLLiteQueryBuilder(QueryBuilder):
QUERY_CLS = SQLLiteQuery

def __init__(self, **kwargs: Any) -> None:
super().__init__(dialect=Dialects.SQLLITE, wrapper_cls=SQLLiteValueWrapper, **kwargs)
super().__init__(
dialect=Dialects.SQLite,
wrap_set_operation_queries=False,
wrapper_cls=SQLiteValueWrapper,
**kwargs,
)
self._insert_or_replace = False

@builder
Expand Down

0 comments on commit 3d13ccd

Please sign in to comment.