Fixed condition error
This commit is contained in:
parent
b784422e69
commit
b5a4da7a37
3 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = based
|
name = based
|
||||||
version = 0.2.1
|
version = 0.2.2
|
||||||
description = A simple, fast (maybe), and reliable (I hope) PostgreSQL ORM oriented for dynamic models.
|
description = A simple, fast (maybe), and reliable (I hope) PostgreSQL ORM oriented for dynamic models.
|
||||||
author = nuark
|
author = nuark
|
||||||
author_email = me@nuark.xyz
|
author_email = me@nuark.xyz
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.1"
|
__version__ = "0.2.2"
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,11 @@ class ColumnCondition:
|
||||||
)
|
)
|
||||||
case "contains":
|
case "contains":
|
||||||
return SQL("{} LIKE {}").format(
|
return SQL("{} LIKE {}").format(
|
||||||
Identifier(self.column), Literal(self.value)
|
Identifier(self.column), Literal(f"%{self.value}%")
|
||||||
)
|
)
|
||||||
case "not_contains":
|
case "not_contains":
|
||||||
return SQL("{} NOT LIKE {}").format(
|
return SQL("{} NOT LIKE {}").format(
|
||||||
Identifier(self.column), Literal(self.value)
|
Identifier(self.column), Literal(f"%{self.value}%")
|
||||||
)
|
)
|
||||||
case "starts_with":
|
case "starts_with":
|
||||||
return SQL("{} LIKE {}").format(
|
return SQL("{} LIKE {}").format(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue