"""
super(TableClause, self).__init__()
- self.name = self.fullname = name
+ self.name = name
self._columns = DedupeColumnCollection()
self.primary_key = ColumnSet()
self.foreign_keys = set()
schema = kw.pop("schema", None)
if schema is not None:
self.schema = schema
+ if self.schema is not None:
+ self.fullname = "%s.%s" % (self.schema, self.name)
+ else:
+ self.fullname = self.name
if kw:
raise exc.ArgumentError("Unsupported argument(s): %s" % list(kw))
assert s3._whereclause.left.table is not s1
assert s3._whereclause.left.table in froms
+ def test_table_schema(self):
+ t = table("foo")
+ eq_(t.name, "foo")
+ eq_(t.fullname, "foo")
+ t = table("foo", schema="bar")
+ eq_(t.name, "foo")
+ eq_(t.fullname, "bar.foo")
+
class RefreshForNewColTest(fixtures.TestBase):
def test_join_uninit(self):