Fixed condition error

This commit is contained in:
Andrew 2023-04-30 12:48:41 +07:00
parent b784422e69
commit b5a4da7a37
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[metadata]
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.
author = nuark
author_email = me@nuark.xyz

View file

@ -1 +1 @@
__version__ = "0.2.1"
__version__ = "0.2.2"

View file

@ -63,11 +63,11 @@ class ColumnCondition:
)
case "contains":
return SQL("{} LIKE {}").format(
Identifier(self.column), Literal(self.value)
Identifier(self.column), Literal(f"%{self.value}%")
)
case "not_contains":
return SQL("{} NOT LIKE {}").format(
Identifier(self.column), Literal(self.value)
Identifier(self.column), Literal(f"%{self.value}%")
)
case "starts_with":
return SQL("{} LIKE {}").format(