diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-17 02:03:00 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-17 02:03:00 +0000 |
commit | 180d3741997c1471b9199334d6076e45cd581d62 (patch) | |
tree | de7b56896d440e375a10df1440f6cccec11047cc /lib/sqlalchemy/schema.py | |
parent | bc698d778d9bc8ddf2ee676fde24326f819da7dc (diff) | |
download | sqlalchemy-180d3741997c1471b9199334d6076e45cd581d62.tar.gz |
reorganizing classnames a bit, flagging "private" classes in the sql package,
getting the generated docs to look a little nicer.
fixes to extensions, sqlsoup etc. to be compatible with recent API tweaks
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r-- | lib/sqlalchemy/schema.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index 88d52f075..ebdecc77a 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -96,10 +96,10 @@ def _get_table_key(name, schema): else: return schema + "." + name -class TableSingleton(type): +class _TableSingleton(type): """a metaclass used by the Table object to provide singleton behavior.""" def __call__(self, name, metadata, *args, **kwargs): - if isinstance(metadata, sql.Engine): + if isinstance(metadata, sql.Executor): # backwards compatibility - get a BoundSchema associated with the engine engine = metadata if not hasattr(engine, '_legacy_metadata'): @@ -150,13 +150,13 @@ class TableSingleton(type): return table -class Table(SchemaItem, sql.TableClause): +class Table(SchemaItem, sql._TableClause): """represents a relational database table. This subclasses sql.TableClause to provide a table that is "wired" to an engine. Whereas TableClause represents a table as its used in a SQL expression, Table represents a table as its created in the database. Be sure to look at sqlalchemy.sql.TableImpl for additional methods defined on a Table.""" - __metaclass__ = TableSingleton + __metaclass__ = _TableSingleton def __init__(self, name, metadata, **kwargs): """Construct a Table. @@ -302,7 +302,7 @@ class Table(SchemaItem, sql.TableClause): args.append(c.copy()) return Table(self.name, metadata, schema=schema, *args) -class Column(SchemaItem, sql.ColumnClause): +class Column(SchemaItem, sql._ColumnClause): """represents a column in a database table. this is a subclass of sql.ColumnClause and represents an actual existing table in the database, in a similar fashion as TableClause/Table.""" def __init__(self, name, type, *args, **kwargs): |