class IdentifierPreparer(object):
Known subclasses: sqlalchemy.databases.firebird.FBIdentifierPreparer
, sqlalchemy.databases.mssql.MSIdentifierPreparer
, sqlalchemy.databases.mysql.MySQLIdentifierPreparer
, sqlalchemy.databases.oracle.OracleIdentifierPreparer
, sqlalchemy.databases.postgresql.PGIdentifierPreparer
, sqlalchemy.databases.sqlite.SQLiteIdentifierPreparer
, sqlalchemy.databases.sybase.SybaseIdentifierPreparer
Method | __init__ |
Construct a new IdentifierPreparer object. |
Method | format_column |
Prepare a quoted column name. |
Method | format_label_name |
Prepare a quoted column name. |
Method | format_schema |
Prepare a quoted schema name. |
Method | format_table |
Prepare a quoted table and schema name. |
Method | format_table_seq |
Format table name and schema as a tuple. |
Method | quote |
Conditionally quote an identifier. |
Method | quote_identifier |
Quote an identifier. |
Method | quote_schema |
Conditionally quote a schema name. |
Method | unformat_identifiers |
Unpack 'schema.table.column'-like strings into components. |
Method | validate_sql_phrase |
keyword sequence filter. |
Class Variable | schema_for_object |
Return the .schema attribute for an object. |
Method | _escape_identifier |
Escape an identifier. |
Method | _render_schema_translates |
Undocumented |
Method | _requires_quotes |
Return True if the given identifier requires quoting. |
Method | _requires_quotes_illegal_chars |
Return True if the given identifier requires quoting, but not taking case convention into account. |
Method | _truncate_and_render_maxlen_name |
Undocumented |
Method | _unescape_identifier |
Canonicalize an escaped identifier. |
Method | _with_schema_translate |
Undocumented |
Method | format_alias |
Undocumented |
Method | format_collation |
Undocumented |
Method | format_constraint |
Undocumented |
Method | format_index |
Undocumented |
Method | format_label |
Undocumented |
Method | format_savepoint |
Undocumented |
Method | format_sequence |
Undocumented |
Method | truncate_and_render_constraint_name |
Undocumented |
Method | truncate_and_render_index_name |
Undocumented |
Instance Variable | _double_percents |
Undocumented |
Instance Variable | _strings |
Undocumented |
Instance Variable | dialect |
Undocumented |
Instance Variable | escape_quote |
Undocumented |
Instance Variable | escape_to_quote |
Undocumented |
Instance Variable | final_quote |
Undocumented |
Instance Variable | initial_quote |
Undocumented |
Instance Variable | omit_schema |
Undocumented |
Instance Variable | quote_case_sensitive_collations |
Undocumented |
Property | _r_identifiers |
Undocumented |
sqlalchemy.databases.firebird.FBIdentifierPreparer
, sqlalchemy.databases.mssql.MSIdentifierPreparer
, sqlalchemy.databases.mysql.MySQLIdentifierPreparer
, sqlalchemy.dialects.postgresql.pg8000.PGIdentifierPreparer_pg8000
Construct a new IdentifierPreparer object.
initial_quote
.Conditionally quote an identifier.
The identifier is quoted if it is a reserved word, contains
quote-necessary characters, or is an instance of
.quoted_name
which includes quote set to True.
Subclasses can override this to provide database-dependent quoting behavior for identifier names.
Parameters | |
ident | string identifier |
force | unused
Deprecated since version 0.9: The :paramref:`.IdentifierPreparer.quote.force`
parameter is deprecated and will be removed in a future
release. This flag has no effect on the behavior of the
.IdentifierPreparer.quote method; please refer to
.quoted_name . |
Quote an identifier.
Subclasses should override this to provide database-dependent quoting behavior.
sqlalchemy.databases.mssql.MSIdentifierPreparer
Conditionally quote a schema name.
The name is quoted if it is a reserved word, contains quote-necessary
characters, or is an instance of .quoted_name
which includes
quote set to True.
Subclasses can override this to provide database-dependent quoting behavior for schema names.
Parameters | |
schema | string schema name |
force | unused
Deprecated since version 0.9: The :paramref:`.IdentifierPreparer.quote_schema.force`
parameter is deprecated and will be removed in a future
release. This flag has no effect on the behavior of the
.IdentifierPreparer.quote method; please refer to
.quoted_name . |
keyword sequence filter.
a filter for elements that are intended to represent keyword sequences, such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters should be present.
Return the .schema attribute for an object.
For the default IdentifierPreparer, the schema for an object is always the value of the ".schema" attribute. if the preparer is replaced with one that has a non-empty schema_translate_map, the value of the ".schema" attribute is rendered a symbol that will be converted to a real schema name from the mapping post-compile.
sqlalchemy.databases.mssql.MSIdentifierPreparer
, sqlalchemy.dialects.mysql.mysqlconnector.MySQLIdentifierPreparer_mysqlconnector
, sqlalchemy.dialects.postgresql.pygresql._PGIdentifierPreparer
Escape an identifier.
Subclasses should override this to provide database-dependent escaping behavior.
sqlalchemy.databases.mssql.MSIdentifierPreparer
Canonicalize an escaped identifier.
Subclasses should override this to provide database-dependent unescaping behavior that reverses _escape_identifier.
Undocumented
sqlalchemy.databases.oracle.OracleIdentifierPreparer
Undocumented