From 8985ab092d06fbb0e337e42007b617d1b664a3f1 Mon Sep 17 00:00:00 2001 From: jiaoqiyuan Date: Thu, 31 Oct 2024 14:13:08 +0800 Subject: [PATCH] Retrieve dbgpts using fuzzy matching --- dbgpt/storage/metadata/_base_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbgpt/storage/metadata/_base_dao.py b/dbgpt/storage/metadata/_base_dao.py index 199b3eabc..c267e1273 100644 --- a/dbgpt/storage/metadata/_base_dao.py +++ b/dbgpt/storage/metadata/_base_dao.py @@ -297,7 +297,7 @@ def _create_query_object( elif isinstance(value, (tuple, dict, set)): continue else: - query = query.filter(getattr(model_cls, key) == value) + query = query.filter(getattr(model_cls, key).like(f"%{value}%")) if desc_order_column: query = query.order_by(desc(getattr(model_cls, desc_order_column)))