Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7f4b61c

Browse files
fix limit() method
1 parent b54b784 commit 7f4b61c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎simple_query_builder/querybuilder.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ def not_null(self, field: str):
462462
return self
463463

464464
def limit(self, limit: int = 1):
465-
self._sql += f" LIMIT {limit}"
465+
if 'DELETE' not in self._sql:
466+
self._sql += f" LIMIT {limit}"
466467
return self
467468

468469
def offset(self, offset: int = 0):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /