advised that all unicode-aware applications make proper use of Python
unicode objects (i.e. u'hello' and not 'hello').
+ - tables with schemas can still be used in sqlite, firebird,
+ schema name just gets dropped [ticket:890]
+
- changed the various "literal" generation functions to use an anonymous
bind parameter. not much changes here except their labels now look
like ":param_1", ":param_2" instead of ":literal"
if name is None:
name = table.name
result = self.quote(table, name)
- if use_schema and getattr(table, "schema", None):
+ if not self.omit_schema and use_schema and getattr(table, "schema", None):
result = self.quote(table, table.schema) + "." + result
return result
class SchemaTest(PersistTest):
+
# this test should really be in the sql tests somewhere, not engine
- @testing.unsupported('sqlite', 'firebird')
def test_iteration(self):
metadata = MetaData()
table1 = Table('table1', metadata,
gen.traverse(table2)
buf = buf.getvalue()
print buf
- assert buf.index("CREATE TABLE someschema.table1") > -1
- assert buf.index("CREATE TABLE someschema.table2") > -1
+ if testbase.db.dialect.preparer(testbase.db.dialect).omit_schema:
+ assert buf.index("CREATE TABLE table1") > -1
+ assert buf.index("CREATE TABLE table2") > -1
+ else:
+ assert buf.index("CREATE TABLE someschema.table1") > -1
+ assert buf.index("CREATE TABLE someschema.table2") > -1
@testing.supported('maxdb', 'mysql', 'postgres')
def test_explicit_default_schema(self):