From ce7b86816f259b655e0a8b907898ee72ac791b11 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 29 Nov 2006 19:46:58 +0000 Subject: [PATCH] - added support for wildcards in dictionary filters --- PLC/Filter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PLC/Filter.py b/PLC/Filter.py index 139da580..4ed819bd 100644 --- a/PLC/Filter.py +++ b/PLC/Filter.py @@ -74,7 +74,11 @@ class Filter(Parameter, dict): if value is None: operator = "IS" value = "NULL" - else: + elif not isinstance(value, bool) \ + and (value.find("*") > -1 or value.find("%") > -1): + operator = "LIKE" + value = str(api.db.quote(value.replace("*", "%"))) + else: operator = "=" value = str(api.db.quote(value)) -- 2.47.0