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

Method qtIdent

web/pgadmin/utils/driver/psycopg3/__init__.py:457–482  ·  view source on GitHub ↗
(conn, *args)

Source from the content-addressed store, hash-verified

455
456 @staticmethod
457 def qtIdent(conn, *args):
458 # We're not using the conn object at the moment, but - we will
459 # modify the logic to use the server version specific keywords later.
460 res = None
461 value = None
462
463 for val in args:
464 if isinstance(val, list):
465 return map(lambda w: Driver.qtIdent(conn, w), val)
466
467 # DataType doesn't have len function then convert it to string
468 if not hasattr(val, '__len__'):
469 val = str(val)
470
471 if len(val) == 0:
472 continue
473
474 value = val
475
476 if Driver.needsQuoting(val, False):
477 value = value.replace("\"", "\"\"")
478 value = "\"" + value + "\""
479
480 res = ((res and res + '.') or '') + value
481
482 return res

Callers 15

parse_priv_to_dbFunction · 0.80
dropMethod · 0.80
sqlMethod · 0.80
create_user_mappingFunction · 0.80
create_typeFunction · 0.80
_fetch_propertiesMethod · 0.80
fetch_templatesMethod · 0.80
sqlMethod · 0.80
_get_resql_for_tableMethod · 0.80
get_partition_schemeMethod · 0.80

Calls 1

needsQuotingMethod · 0.80

Tested by 2

runTestMethod · 0.64