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

Function tables

web/pgadmin/tools/erd/__init__.py:780–798  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

778@socketio.on('tables', namespace=SOCKETIO_NAMESPACE)
779@socket_login_required
780def tables(params):
781 try:
782 helper = ERDHelper(params['trans_id'], params['sid'], params['did'])
783 _get_connection(params['sid'], params['did'], params['trans_id'])
784
785 status, tables = helper.get_all_tables(params.get('scid', None),
786 params.get('tid', None))
787
788 if not status:
789 tables = tables.json if isinstance(tables, Response) else tables
790 socketio.emit('tables_failed', tables,
791 namespace=SOCKETIO_NAMESPACE,
792 to=request.sid)
793 return
794 socketio.emit('tables_success', tables, namespace=SOCKETIO_NAMESPACE,
795 to=request.sid)
796 except Exception as e:
797 socketio.emit('tables_failed', str(e), namespace=SOCKETIO_NAMESPACE,
798 to=request.sid)
799
800
801@blueprint.route('/close/<int:trans_id>/<int:sgid>/<int:sid>/<int:did>',

Callers

nothing calls this directly

Calls 5

get_all_tablesMethod · 0.95
ERDHelperClass · 0.85
emitMethod · 0.80
_get_connectionFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected