diff --git a/setup.cfg b/setup.cfg index 2541770..276503c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/src/based/__init__.py b/src/based/__init__.py index 3ced358..b5fdc75 100644 --- a/src/based/__init__.py +++ b/src/based/__init__.py @@ -1 +1 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/src/based/db.py b/src/based/db.py index 9843901..2ccc0da 100644 --- a/src/based/db.py +++ b/src/based/db.py @@ -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(