def unsafeSQLIdentificatorNaming(name):
 retVal = name
 if isinstance(name, basestring):
  if (Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS)):
   retVal = name.replace('`', '')
  elif (Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.DB2)):
   retVal = name.replace('"', '')
  elif (Backend.getIdentifiedDbms() in (DBMS.ORACLE,)):
   retVal = name.replace('"', '').upper()
  elif (Backend.getIdentifiedDbms() in (DBMS.MSSQL,)):
   retVal = name.replace('[', '').replace(']', '')
  if (Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE)):
   prefix = ('%s.' % DEFAULT_MSSQL_SCHEMA)
   if retVal.startswith(prefix):
    retVal = retVal[len(prefix):]
 return retVal

def unsafeSQLIdentificatorNaming ( name ) : retVal = name if isinstance ( name , basestring ) : if ( Backend . getIdentifiedDbms ( ) in ( DBMS . MYSQL , DBMS . ACCESS ) ) : retVal = name . replace ( '`' , '' ) elif ( Backend . getIdentifiedDbms ( ) in ( DBMS . PGSQL , DBMS . DB2 ) ) : retVal = name . replace ( '"' , '' ) elif ( Backend . getIdentifiedDbms ( ) in ( DBMS . ORACLE , ) ) : retVal = name . replace ( '"' , '' ) . upper ( ) elif ( Backend . getIdentifiedDbms ( ) in ( DBMS . MSSQL , ) ) : retVal = name . replace ( '[' , '' ) . replace ( ']' , '' ) if ( Backend . getIdentifiedDbms ( ) in ( DBMS . MSSQL , DBMS . SYBASE ) ) : prefix = ( '%s.' % DEFAULT_MSSQL_SCHEMA ) if retVal . startswith ( prefix ) : retVal = retVal [ len ( prefix ) : ] return retVal
extracts identificators name from its safe sql representation .