On Dec 5, 2012, at 6:50 PM, Derek Harland wrote:

> 
> I wonder if a solution here is to somehow allow the "schema" argument to also 
> be given as a tuple.  eg 
>       
>       schema="x.y"  would generate a DDL path as x.y
>       schema=["x.y"]  would generate a DDL path as [x.y]
>       schema=["a.b", "x.y"]  would generate a DDL path as [a.b].[x.y]
> 
> Thus eg MSIdentifierPreparer.quote_schema could be something like:
> 
>    def quote_schema(self, schema, force=True):
>        """Prepare a quoted table and schema name."""
>        if not isinstance(schema, (list, tuple)):
>            schema = schema.split('.')
>        result = '.'.join([self.quote(x, force) for x in schema])
>        return result
> 
> then _owner_plus_db could special case on whether schema is a list.

"schema" is a pretty major argument that I'd rather not dilute its datatype, it 
seems more intuitive anyway that we'd just allow SQL-server style quoting to be 
significant:

        "C", schema="A.B"

        "C", schema="[A.B]"

        "C", schema="[A.B].[C.D]"

that way...it works exactly like SQL Server does.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to