mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow to specify the number of arguments in the qtTypeIdent to make it work
with schema specified object name. You can use the qtTypeIdent template filter as: conn|qtTypeIdent(name) or, conn|qtTypeIdent(schema_name, name)
This commit is contained in:
@@ -845,18 +845,25 @@ class Driver(BaseDriver):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def qtTypeIdent(value):
|
def qtTypeIdent(conn, *args):
|
||||||
|
# We're not using the conn object at the moment, but - we will modify the
|
||||||
|
# logic to use the server version specific keywords later.
|
||||||
|
res = None
|
||||||
|
value = None
|
||||||
|
|
||||||
if (len(value) == 0):
|
for val in args:
|
||||||
return value
|
if len(val) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
result = value;
|
value = val
|
||||||
|
|
||||||
if (Driver.needsQuoting(result, True)):
|
if (Driver.needsQuoting(val, True)):
|
||||||
result.replace("\"", "\"\"")
|
value.replace("\"", "\"\"")
|
||||||
return "\"" + result + "\""
|
value = "\"" + value + "\""
|
||||||
else:
|
|
||||||
return result
|
res = ((res and res + '.') or '') + value
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def qtIdent(conn, *args):
|
def qtIdent(conn, *args):
|
||||||
|
|||||||
Reference in New Issue
Block a user