def __init__(self, dialect):
super(InfoIdentifierPreparer, self).__init__(dialect, initial_quote="'")
- def _fold_identifier_case(self, value):
- return value.lower()
-
def _requires_quotes(self, value):
return False
#TODO: determin MSSQL's escapeing rules
return value
- def _fold_identifier_case(self, value):
- #TODO: determin MSSQL's case folding rules
- return value
-
dialect = MSSQLDialect
dialect.statement_compiler = MSSQLCompiler
dialect.schemagenerator = MSSQLSchemaGenerator
def __init__(self, dialect, **kw):
super(_MySQLIdentifierPreparer, self).__init__(dialect, **kw)
- def _fold_identifier_case(self, value):
- # TODO: determine MySQL's case folding rules
- #
- # For compatability with sql.text() issued statements, maybe it's best
- # to just leave things as-is. When lower_case_table_names > 0 it
- # looks a good idea to lc everything, but more importantly the casing
- # of all identifiers in an expression must be consistent. So for now,
- # just leave everything as-is.
- return value
-
def _quote_free_identifiers(self, *ids):
"""Unilaterally identifier-quote any number of strings."""
return None
class PGIdentifierPreparer(compiler.IdentifierPreparer):
- def _fold_identifier_case(self, value):
- return value.lower()
-
def _unquote_identifier(self, value):
if value[0] == self.initial_quote:
value = value[1:-1].replace('""','"')
return self.initial_quote + self._escape_identifier(value) + self.final_quote
- def _fold_identifier_case(self, value):
- """Fold the case of an identifier.
-
- Subclasses should override this to provide database-dependent
- case folding behavior.
- """
-
- return value
- # ANSI SQL calls for the case of all unquoted identifiers to be folded to UPPER.
- # some tests would need to be rewritten if this is done.
- #return value.upper()
-
def _requires_quotes(self, value):
"""Return True if the given identifier requires quoting."""
lc_value = value.lower()