Trivial update

This commit is contained in:
Miroslav Stampar
2019-11-13 13:56:11 +01:00
parent 7202bb010c
commit 15f94bd671
2 changed files with 17 additions and 1 deletions

View File

@@ -4040,6 +4040,14 @@ def safeSQLIdentificatorNaming(name, isTable=False):
Returns a safe representation of SQL identificator name (internal data format)
# Reference: http://stackoverflow.com/questions/954884/what-special-characters-are-allowed-in-t-sql-column-retVal
>>> pushValue(kb.forcedDbms)
>>> kb.forcedDbms = DBMS.MSSQL
>>> getText(safeSQLIdentificatorNaming("begin"))
'[begin]'
>>> getText(safeSQLIdentificatorNaming("foobar"))
'foobar'
>>> kb.forceDbms = popValue()
"""
retVal = name
@@ -4079,6 +4087,14 @@ def safeSQLIdentificatorNaming(name, isTable=False):
def unsafeSQLIdentificatorNaming(name):
"""
Extracts identificator's name from its safe SQL representation
>>> pushValue(kb.forcedDbms)
>>> kb.forcedDbms = DBMS.MSSQL
>>> getText(unsafeSQLIdentificatorNaming("[begin]"))
'begin'
>>> getText(unsafeSQLIdentificatorNaming("foobar"))
'foobar'
>>> kb.forceDbms = popValue()
"""
retVal = name