public inbox for [email protected]
help / color / mirror / Atom feedFrom: Khushboo Vashi <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][Patch] - SonarQube Fixes
Date: Thu, 3 Sep 2020 16:39:05 +0530
Message-ID: <CAFOhELe247iLoVJjX0v4fXtTA0KjhXvdB_+SH_yPBZEyc5uLEQ@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDfoJY0JjjeP_H0pgB4ju7khyHe0X3V+ut9r42d+8ENtuw@mail.gmail.com>
References: <CAFOhELd+8ump0kQ-UHeN9szfefVh-QG0HvGSFZif47ryPoETrw@mail.gmail.com>
<CANxoLDf93wWrt8W94wVhtz1mzFJJe2Hb8UNDPmL+maxwnpNcrQ@mail.gmail.com>
<CAFOhELd0nZfCT8=TE+bFQovgyDN=GtzYPnUgz0m+L2G-+wb+5Q@mail.gmail.com>
<CANxoLDfoJY0JjjeP_H0pgB4ju7khyHe0X3V+ut9r42d+8ENtuw@mail.gmail.com>
Hi,
Please find more fixes for the sonarqube code smells having the rule "String
literals should not be duplicated".
Thanks,
Khushboo
On Wed, Aug 19, 2020 at 2:27 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, patch applied.
>
> On Wed, Aug 19, 2020 at 2:01 PM Khushboo Vashi <
> [email protected]> wrote:
>
>> Hi,
>>
>> Please find the attached updated patch.
>>
>>
>> On Tue, Aug 4, 2020 at 12:10 PM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Hi Khushboo
>>>
>>> As per offline discussion, multiple developers declaring the constant
>>> for the same string and error messages. To avoid that only one developer
>>> should work on this task.
>>> Suggestions:
>>>
>>> - We should have a common class for Constants (which are not module
>>> specific).
>>>
>>> Made a constant.py file which contains the common Constants.
>>
>>>
>>> - For module specific constants we should not declare them as Global
>>> variables if possible declare them as the Class variable.
>>>
>>>
>>> - For common error messages(if any) we can define functions in
>>> PGChildNodeView.
>>>
>>> Already implemented.
>>
>>> Please incorporate the changes send by Yogesh.
>>>
>> I will send another patch for Yogesh's changes as needed more changes.
>>
>> Thanks,
>> Khushboo
>>
>>>
>>> On Mon, Aug 3, 2020 at 1:36 PM Khushboo Vashi <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Please find the attached patch to fix the sonarqube code smells having
>>>> the rule "String literals should not be duplicated".
>>>>
>>>> Thanks,
>>>> Khushboo
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Sr. Software Architect*
>>> *EDB Postgres <http://edbpostgres.com>*
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Sr. Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
Attachments:
[application/octet-stream] Sonar_Qube_Fixes.patch (22.3K, 3-Sonar_Qube_Fixes.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
index 362209a11..10fce304f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
@@ -19,6 +19,10 @@ from pgadmin.browser.collection import CollectionNodeModule
from pgadmin.utils.ajax import internal_server_error
from pgadmin.utils.driver import get_driver
from config import PG_DEFAULT_DRIVER
+from pgadmin.utils.constants import DATATYPE_TIME_WITH_TIMEZONE,\
+ DATATYPE_TIME_WITHOUT_TIMEZONE,\
+ DATATYPE_TIMESTAMP_WITH_TIMEZONE,\
+ DATATYPE_TIMESTAMP_WITHOUT_TIMEZONE
class SchemaChildModule(CollectionNodeModule):
@@ -205,20 +209,22 @@ class DataTypeReader:
1014, 'bpchar[]', 'character[]',
1015, 'varchar[]', 'character varying[]'):
typeval = 'L'
- elif elemoid_or_name in (1083, 'time', 'time without time zone',
+ elif elemoid_or_name in (1083, 'time',
+ DATATYPE_TIME_WITHOUT_TIMEZONE,
1114, 'timestamp',
- 'timestamp without time zone',
+ DATATYPE_TIMESTAMP_WITHOUT_TIMEZONE,
1115, 'timestamp[]',
'timestamp without time zone[]',
1183, 'time[]',
'time without time zone[]',
1184, 'timestamptz',
- 'timestamp with time zone',
+ DATATYPE_TIMESTAMP_WITH_TIMEZONE,
1185, 'timestamptz[]',
'timestamp with time zone[]',
1186, 'interval',
1187, 'interval[]', 'interval[]',
- 1266, 'timetz', 'time with time zone',
+ 1266, 'timetz',
+ DATATYPE_TIME_WITH_TIMEZONE,
1270, 'timetz', 'time with time zone[]'):
typeval = 'D'
elif elemoid_or_name in (1231, 'numeric[]',
@@ -254,12 +260,12 @@ class DataTypeReader:
elif (
name == 'time' or
name == 'timetz' or
- name == 'time without time zone' or
- name == 'time with time zone' or
+ name == DATATYPE_TIME_WITHOUT_TIMEZONE or
+ name == DATATYPE_TIME_WITH_TIMEZONE or
name == 'timestamp' or
name == 'timestamptz' or
- name == 'timestamp without time zone' or
- name == 'timestamp with time zone' or
+ name == DATATYPE_TIMESTAMP_WITHOUT_TIMEZONE or
+ name == DATATYPE_TIMESTAMP_WITH_TIMEZONE or
name == 'bit' or
name == 'bit varying' or
name == 'varbit'
@@ -300,13 +306,13 @@ class DataTypeReader:
"""
if name == 'char' and schema == 'pg_catalog':
return '"char"' + array
- elif name == 'time with time zone':
+ elif name == DATATYPE_TIME_WITH_TIMEZONE:
return 'time' + length + ' with time zone' + array
- elif name == 'time without time zone':
+ elif name == DATATYPE_TIME_WITHOUT_TIMEZONE:
return 'time' + length + ' without time zone' + array
- elif name == 'timestamp with time zone':
+ elif name == DATATYPE_TIMESTAMP_WITH_TIMEZONE:
return 'timestamp' + length + ' with time zone' + array
- elif name == 'timestamp without time zone':
+ elif name == DATATYPE_TIMESTAMP_WITHOUT_TIMEZONE:
return 'timestamp' + length + ' without time zone' + array
else:
return name + length + array
diff --git a/web/pgadmin/misc/file_manager/__init__.py b/web/pgadmin/misc/file_manager/__init__.py
index 955f98073..a96d7b9ec 100644
--- a/web/pgadmin/misc/file_manager/__init__.py
+++ b/web/pgadmin/misc/file_manager/__init__.py
@@ -557,10 +557,9 @@ class Filemanager(object):
Filemanager.check_access_permission(in_dir, path)
except Exception as e:
Filemanager.resume_windows_warning()
- err_msg = gettext("Error: {0}").format(e)
files = {
'Code': 0,
- 'Error': err_msg
+ 'Error': str(e)
}
return files
@@ -660,9 +659,9 @@ class Filemanager(object):
Filemanager.resume_windows_warning()
if (hasattr(e, 'strerror') and
e.strerror == gettext('Permission denied')):
- err_msg = gettext("Error: {0}").format(e.strerror)
+ err_msg = str(e.strerror)
else:
- err_msg = gettext("Error: {0}").format(e)
+ err_msg = str(e)
files = {
'Code': 0,
'Error': err_msg
@@ -752,7 +751,7 @@ class Filemanager(object):
'Filename': split_path(path)[-1],
'FileType': '',
'Path': path,
- 'Error': gettext("Error: {0}").format(e),
+ 'Error': str(e),
'Code': 0,
'Info': '',
'Properties': {
@@ -836,7 +835,7 @@ class Filemanager(object):
Filemanager.check_access_permission(the_dir, new)
except Exception as e:
res = {
- 'Error': gettext("Error: {0}").format(e),
+ 'Error': str(e),
'Code': 0
}
return res
@@ -897,7 +896,7 @@ class Filemanager(object):
Filemanager.check_access_permission(the_dir, path)
except Exception as e:
res = {
- 'Error': gettext("Error: {0}").format(e),
+ 'Error': str(e),
'Code': 0
}
return res
@@ -911,7 +910,7 @@ class Filemanager(object):
os.remove(orig_path)
except Exception as e:
code = 0
- err_msg = gettext("Error: {0}").format(e.strerror)
+ err_msg = str(e.strerror)
result = {
'Path': path,
@@ -951,14 +950,13 @@ class Filemanager(object):
f.write(data)
except Exception as e:
code = 0
- err_msg = gettext("Error: {0}").format(
- e.strerror if hasattr(e, 'strerror') else gettext('Unknown'))
+ err_msg = str(e.strerror) if hasattr(e, 'strerror') else str(e)
try:
Filemanager.check_access_permission(the_dir, path)
except Exception as e:
res = {
- 'Error': gettext("Error: {0}").format(e),
+ 'Error': str(e),
'Code': 0
}
return res
@@ -992,9 +990,9 @@ class Filemanager(object):
except Exception as e:
code = 0
if hasattr(e, 'strerror'):
- err_msg = gettext("Error: {0}").format(e.strerror)
+ err_msg = str(e.strerror)
else:
- err_msg = gettext("Error: {0}").format(e)
+ err_msg = str(e)
result = {
'Path': path,
@@ -1084,13 +1082,13 @@ class Filemanager(object):
# we don't want to expose real path of file
# so only show error message.
if ex.strerror == 'Permission denied':
- err_msg = gettext("Error: {0}").format(ex.strerror)
+ err_msg = str(ex.strerror)
else:
- err_msg = gettext("Error: {0}").format(str(ex))
+ err_msg = str(ex)
except Exception as ex:
status = False
- err_msg = gettext("Error: {0}").format(str(ex))
+ err_msg = str(ex)
# Remove root storage path from error message
# when running in Server mode
@@ -1118,7 +1116,7 @@ class Filemanager(object):
path, name))
except Exception as e:
res = {
- 'Error': gettext("Error: {0}").format(e),
+ 'Error': str(e),
'Code': 0
}
return res
@@ -1136,14 +1134,14 @@ class Filemanager(object):
os.mkdir(new_path)
except Exception as e:
code = 0
- err_msg = gettext("Error: {0}").format(e.strerror)
+ err_msg = str(e.strerror)
else:
new_path, new_name = self.get_new_name(the_dir, path, name)
try:
os.mkdir(new_path)
except Exception as e:
code = 0
- err_msg = gettext("Error: {0}").format(e.strerror)
+ err_msg = str(e.strerror)
result = {
'Parent': path,
@@ -1172,7 +1170,7 @@ class Filemanager(object):
the_dir, "{}{}".format(path, path)
)
except Exception as e:
- resp = Response(gettext("Error: {0}").format(e))
+ resp = Response(str(e))
resp.headers['Content-Disposition'] = \
'attachment; filename=' + name
return resp
@@ -1189,7 +1187,7 @@ class Filemanager(object):
try:
Filemanager.check_access_permission(the_dir, path)
except Exception as e:
- err_msg = gettext("Error: {0}").format(e)
+ err_msg = str(e)
res['Code'] = 0
res['Error'] = err_msg
return res
diff --git a/web/pgadmin/tools/schema_diff/__init__.py b/web/pgadmin/tools/schema_diff/__init__.py
index babb05888..ea533eb6d 100644
--- a/web/pgadmin/tools/schema_diff/__init__.py
+++ b/web/pgadmin/tools/schema_diff/__init__.py
@@ -26,7 +26,8 @@ from pgadmin.tools.schema_diff.model import SchemaDiffModel
from config import PG_DEFAULT_DRIVER
from pgadmin.utils.driver import get_driver
from pgadmin.utils.preferences import Preferences
-from pgadmin.utils.constants import PREF_LABEL_DISPLAY, MIMETYPE_APP_JS
+from pgadmin.utils.constants import PREF_LABEL_DISPLAY, MIMETYPE_APP_JS,\
+ ERROR_MSG_TRANS_ID_NOT_FOUND
from sqlalchemy import or_
MODULE_NAME = 'schema_diff'
@@ -439,7 +440,7 @@ def compare(trans_id, source_sid, source_did, target_sid, target_did):
status, error_msg, diff_model_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg, status=404)
# Server version compatibility check
@@ -566,7 +567,7 @@ def poll(trans_id):
status, error_msg, diff_model_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg, status=404)
msg, diff_percentage = diff_model_obj.get_comparison_info()
@@ -599,7 +600,7 @@ def ddl_compare(trans_id, source_sid, source_did, source_scid,
status, error_msg, diff_model_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg, status=404)
view = SchemaDiffRegistry.get_node_view(node_type)
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 014192763..524d0294b 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -44,7 +44,8 @@ from pgadmin.tools.sqleditor.utils.query_tool_fs_utils import \
read_file_generator
from pgadmin.tools.sqleditor.utils.filter_dialog import FilterDialog
from pgadmin.tools.sqleditor.utils.query_history import QueryHistory
-from pgadmin.utils.constants import MIMETYPE_APP_JS, SERVER_CONNECTION_CLOSED
+from pgadmin.utils.constants import MIMETYPE_APP_JS, SERVER_CONNECTION_CLOSED,\
+ ERROR_MSG_TRANS_ID_NOT_FOUND
MODULE_NAME = 'sqleditor'
@@ -139,17 +140,13 @@ def check_transaction_status(trans_id):
"""
if 'gridData' not in session:
- return False, gettext(
- 'Transaction ID not found in the session.'
- ), None, None, None
+ return False, ERROR_MSG_TRANS_ID_NOT_FOUND, None, None, None
grid_data = session['gridData']
# Return from the function if transaction id not found
if str(trans_id) not in grid_data:
- return False, gettext(
- 'Transaction ID not found in the session.'
- ), None, None, None
+ return False, ERROR_MSG_TRANS_ID_NOT_FOUND, None, None, None
# Fetch the object for the specified transaction id.
# Use pickle.loads function to get the command object
@@ -199,7 +196,7 @@ def start_view_data(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -345,7 +342,7 @@ def poll(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -531,7 +528,7 @@ def fetch(trans_id, fetch_all=None):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -677,7 +674,7 @@ def save(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -750,7 +747,7 @@ def append_filter_inclusive(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -805,7 +802,7 @@ def append_filter_exclusive(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -857,7 +854,7 @@ def remove_filter(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -901,7 +898,7 @@ def set_limit(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -984,7 +981,7 @@ def cancel_transaction(trans_id):
if is_error:
return make_json_response(
success=0,
- errormsg=gettext('Transaction ID not found in the session.'),
+ errormsg=ERROR_MSG_TRANS_ID_NOT_FOUND,
info='DATAGRID_TRANSACTION_REQUIRED', status=404)
# Fetch the object for the specified transaction id.
@@ -1043,7 +1040,7 @@ def get_object_name(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -1079,7 +1076,7 @@ def set_auto_commit(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -1124,7 +1121,7 @@ def set_auto_rollback(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
@@ -1176,7 +1173,7 @@ def auto_complete(trans_id):
status, error_msg, conn, trans_obj, session_obj = \
check_transaction_status(trans_id)
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(success=0, errormsg=error_msg,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404)
diff --git a/web/pgadmin/tools/sqleditor/utils/filter_dialog.py b/web/pgadmin/tools/sqleditor/utils/filter_dialog.py
index 62baab3de..77efd80a8 100644
--- a/web/pgadmin/tools/sqleditor/utils/filter_dialog.py
+++ b/web/pgadmin/tools/sqleditor/utils/filter_dialog.py
@@ -16,6 +16,7 @@ from pgadmin.utils.ajax import make_json_response, internal_server_error
from pgadmin.tools.sqleditor.utils.update_session_grid_transaction import \
update_session_grid_transaction
from pgadmin.utils.exception import ConnectionLost, SSHTunnelConnectionLost
+from pgadmin.utils.constants import ERROR_MSG_TRANS_ID_NOT_FOUND
class FilterDialog(object):
@@ -23,7 +24,7 @@ class FilterDialog(object):
def get(*args):
"""To fetch the current sorted columns"""
status, error_msg, conn, trans_obj, session_obj = args
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(
success=0,
errormsg=error_msg,
@@ -76,7 +77,7 @@ class FilterDialog(object):
else:
data = request.args or request.form
- if error_msg == gettext('Transaction ID not found in the session.'):
+ if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND:
return make_json_response(
success=0,
errormsg=error_msg,
diff --git a/web/pgadmin/tools/sqleditor/utils/start_running_query.py b/web/pgadmin/tools/sqleditor/utils/start_running_query.py
index ab845cc51..7bac78ba5 100644
--- a/web/pgadmin/tools/sqleditor/utils/start_running_query.py
+++ b/web/pgadmin/tools/sqleditor/utils/start_running_query.py
@@ -27,6 +27,7 @@ from pgadmin.utils.ajax import make_json_response, internal_server_error
from pgadmin.utils.driver import get_driver
from pgadmin.utils.exception import ConnectionLost, SSHTunnelConnectionLost,\
CryptKeyMissing
+from pgadmin.utils.constants import ERROR_MSG_TRANS_ID_NOT_FOUND
class StartRunningQuery:
@@ -173,7 +174,7 @@ class StartRunningQuery:
if 'gridData' not in http_session:
return make_json_response(
success=0,
- errormsg=gettext('Transaction ID not found in the session.'),
+ errormsg=ERROR_MSG_TRANS_ID_NOT_FOUND,
info='DATAGRID_TRANSACTION_REQUIRED', status=404
)
grid_data = http_session['gridData']
@@ -181,7 +182,7 @@ class StartRunningQuery:
if str(transaction_id) not in grid_data:
return make_json_response(
success=0,
- errormsg=gettext('Transaction ID not found in the session.'),
+ errormsg=ERROR_MSG_TRANS_ID_NOT_FOUND,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404
)
diff --git a/web/pgadmin/utils/constants.py b/web/pgadmin/utils/constants.py
index 88ae50de2..4ef032892 100644
--- a/web/pgadmin/utils/constants.py
+++ b/web/pgadmin/utils/constants.py
@@ -29,3 +29,14 @@ PGADMIN_NODE = 'pgadmin.node.%s'
UNAUTH_REQ = "Unauthorized request."
SERVER_CONNECTION_CLOSED = gettext(
'Not connected to server or connection with the server has been closed.')
+
+# Data Types
+DATATYPE_TIME_WITH_TIMEZONE = 'time with time zone'
+DATATYPE_TIME_WITHOUT_TIMEZONE = 'time without time zone'
+
+DATATYPE_TIMESTAMP_WITH_TIMEZONE = 'timestamp with time zone'
+DATATYPE_TIMESTAMP_WITHOUT_TIMEZONE = 'timestamp without time zone'
+
+# Error Messages
+ERROR_MSG_TRANS_ID_NOT_FOUND = gettext(
+ 'Transaction ID not found in the session.')
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin4][Patch] - SonarQube Fixes
In-Reply-To: <CAFOhELe247iLoVJjX0v4fXtTA0KjhXvdB_+SH_yPBZEyc5uLEQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox