diff --git a/pepdbagent/modules/schema.py b/pepdbagent/modules/schema.py index 4294476..ff6f274 100644 --- a/pepdbagent/modules/schema.py +++ b/pepdbagent/modules/schema.py @@ -207,6 +207,7 @@ def _add_condition( search_query = or_( Schemas.name.ilike(sql_search_str), Schemas.description.ilike(sql_search_str), + Schemas.namespace.ilike(sql_search_str), ) statement = statement.where(search_query) if namespace: diff --git a/pepdbagent/utils.py b/pepdbagent/utils.py index 2c4f990..1bec815 100644 --- a/pepdbagent/utils.py +++ b/pepdbagent/utils.py @@ -90,7 +90,7 @@ def schema_path_converter(schema_path: str) -> Tuple[str, str]: if "/" in schema_path: namespace, name = schema_path.split("/") return namespace, name - raise RegistryPathError(f"Error in: '{schema_path}'") + raise RegistryPathError(f"Incorrect schema registry path: '{schema_path}'") def tuple_converter(value: Union[tuple, list, str, None]) -> tuple: diff --git a/tests/test_schema.py b/tests/test_schema.py index 52e329c..131b67f 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -7,7 +7,7 @@ not PEPDBAgentContextManager().db_setup(), reason="DB is not setup", ) -class TestSamples: +class TestSchemas: @pytest.mark.parametrize( "namespace, name",