MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / search

Function search

web/pgadmin/tools/search_objects/__init__.py:74–90  ·  view source on GitHub ↗

URL args: text : search text type : type of object to be searched.

(sid, did)

Source from the content-addressed store, hash-verified

72@permissions_required(AllPermissionTypes.tools_search_objects)
73@pga_login_required
74def search(sid, did):
75 """
76 URL args:
77 text <required>: search text
78 type <optional>: type of object to be searched.
79 """
80 text = request.args.get('text', None)
81 obj_type = request.args.get('type', None)
82
83 so_obj = SearchObjectsHelper(sid, did, blueprint.show_system_objects())
84
85 status, res = so_obj.search(text, obj_type)
86
87 if not status:
88 return internal_server_error(errormsg=res)
89
90 return make_json_response(data=res)

Callers

nothing calls this directly

Calls 6

searchMethod · 0.95
SearchObjectsHelperClass · 0.90
internal_server_errorFunction · 0.90
make_json_responseFunction · 0.90
getMethod · 0.45
show_system_objectsMethod · 0.45

Tested by

no test coverage detected