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

Function schemas

web/pgadmin/tools/schema_diff/__init__.py:458–477  ·  view source on GitHub ↗

This function will return the list of schemas for the specified server id and database id.

(sid, did)

Source from the content-addressed store, hash-verified

456)
457@pga_login_required
458def schemas(sid, did):
459 """
460 This function will return the list of schemas for the specified
461 server id and database id.
462 """
463 res = []
464 try:
465 schemas = get_schemas(sid, did)
466 if schemas is not None:
467 for sch in schemas:
468 res.append({
469 "value": sch['_id'],
470 "label": sch['label'],
471 "_id": sch['_id'],
472 "image": sch['icon'],
473 })
474 except Exception as e:
475 app.logger.exception(e)
476
477 return make_json_response(data=res)
478
479
480@socketio.on('compare_database', namespace=SOCKETIO_NAMESPACE)

Callers

nothing calls this directly

Calls 3

make_json_responseFunction · 0.90
appendMethod · 0.80
get_schemasFunction · 0.70

Tested by

no test coverage detected