Re: [SQLObject] specifying schema for mssql
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Andrew Z <ah...@gm...> - 2013-02-06 16:22:29
|
On Mon, Feb 4, 2013 at 2:40 PM, Oleg Broytman <ph...@ph...> wrote: > On Mon, Feb 04, 2013 at 02:20:59PM -0700, Andrew Z <ah...@gm...> wrote: >> With SQLObject 1.3.2 and mssql backend, how do you specify the schema >> equivalent to the command 'use foo'? I want to use a schema that is >> neither 'dbo' not the default for the user. I don't see how to do it >> using the URI after glancing over the documentation and code. > > Using non-default schema is only implemented for Postgres. You can > see how it's implemented in sqlobject/postgres/pgconnection.py and > implement something similar for mssql. Thank you for the tip. Postgres makes it easier because it has a session-level command for specifying the schema search path, but Microsoft SQL Server requires the schema to be pretended to every table reference for every query. For now I will stick with the default schema. Best regards, Andrew |