MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / format_table_seq

Method format_table_seq

lib/sqlalchemy/sql/compiler.py:8053–8068  ·  view source on GitHub ↗

Format table name and schema as a tuple.

(self, table, use_schema=True)

Source from the content-addressed store, hash-verified

8051 return name
8052
8053 def format_table_seq(self, table, use_schema=True):
8054 """Format table name and schema as a tuple."""
8055
8056 # Dialects with more levels in their fully qualified references
8057 # ('database', 'owner', etc.) could override this and return
8058 # a longer sequence.
8059
8060 effective_schema = self.schema_for_object(table)
8061
8062 if not self.omit_schema and use_schema and effective_schema:
8063 return (
8064 self.quote_schema(effective_schema),
8065 self.format_table(table, use_schema=False),
8066 )
8067 else:
8068 return (self.format_table(table, use_schema=False),)
8069
8070 @util.memoized_property
8071 def _r_identifiers(self):

Callers 1

visit_ddlMethod · 0.80

Calls 3

quote_schemaMethod · 0.95
format_tableMethod · 0.95
schema_for_objectMethod · 0.45

Tested by

no test coverage detected