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

Method get_object_msg

web/pgadmin/tools/maintenance/__init__.py:73–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 return "{0} ({1}:{2})".format(s.name, host, port)
72
73 def get_object_msg(self):
74 msg = _("on database '{0}'").format(self.data['database'])
75 if 'primary_key' in self.data or 'unique_constraint' in self.data:
76 msg = _("on constraint '{0}/{1}/{2}/{3}'").format(
77 self.data['database'], self.data['schema'], self.data['table'],
78 self.data['primary_key'] if 'primary_key' in self.data else
79 self.data['unique_constraint'])
80 elif 'index' in self.data:
81 msg = _("on index '{0}/{1}/{2}/{3}'").format(
82 self.data['database'], self.data['schema'],
83 self.data['table'], self.data['index'])
84 elif 'table' in self.data:
85 msg = _("on table '{0}/{1}/{2}'").format(
86 self.data['database'], self.data['schema'], self.data['table'])
87 elif 'schema' in self.data:
88 msg = _("on schema '{0}/{1}'").format(self.data['database'],
89 self.data['schema'])
90 return msg
91
92 @property
93 def message(self):

Callers 1

messageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected