Skip to content

Commit d170d70

Browse files
committed
add _SQLITE_JOIN_TYPES property
1 parent 0959f64 commit d170d70

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

simple_query_builder/querybuilder.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class QueryBuilder:
5151
"FULL OUTER",
5252
"CROSS"
5353
]
54+
_SQLITE_JOIN_TYPES: list = [
55+
"INNER",
56+
"LEFT OUTER",
57+
"CROSS"
58+
]
5459
_NO_FETCH: int = 0
5560
_FETCH_ONE: int = 1
5661
_FETCH_ALL: int = 2
@@ -601,7 +606,7 @@ def update(self, table: Union[str, dict], fields: Union[list, dict]):
601606

602607
def join(self, table: Union[str, dict] = "", on: Union[str, tuple, list] = (), join_type: str = "INNER"):
603608
join_type = join_type.upper()
604-
if join_type == "" or join_type not in self._JOIN_TYPES:
609+
if join_type == "" or join_type not in self._SQLITE_JOIN_TYPES:
605610
self.set_error(f"Empty join_type or is not allowed in {inspect.stack()[0][3]} method")
606611
return self
607612

0 commit comments

Comments
 (0)