Hi. I recently switched a sqlalchemy project from using manual mapping
of classes to ext.declarative.
This is in a turbogears project and I am using their metadata and
mapper. Before I had:
from turbogears.database import metadata, mapper
users_table = sqlalchemy.Table('users', metadata, ... )
On Mar 29, 2008, at 9:13 AM, Bobby Impollonia wrote:
Hi. I recently switched a sqlalchemy project from using manual mapping
of classes to ext.declarative.
This is in a turbogears project and I am using their metadata and
mapper. Before I had:
from turbogears.database import metadata,
On Mar 27, 2008, at 5:31 PM, maxi wrote:
Hi,
Is possible (Are there some built-in function?) to convert a string
sql expresion to sqlalchemy expression?
I will try to explain this with an example
An user_table and User mapped class:
sql_where = 'name like '%John%'
sql_where -
On Mar 27, 2008, at 2:36 PM, [EMAIL PROTECTED] wrote:
SELECT dbo.computer.group_id AS computerid, dbo.computer.name AS
computername, dbo.computer_group.group_id AS groupid,
dbo.computer_group.name AS groupname FROM dbo.computer,
dbo.computer_group
Anyone who can offer a quick statement
On Mar 29, 2008, at 10:23 AM, Bobby Impollonia wrote:
Awesome! I added that __mapper_args__ to each of my classes and it
totally worked. All of my test cases (written before switching to
declarative) pass now where they had all failed before (lots of code
relying on .query), so I am happy
On Fri, Mar 28, 2008 at 10:54 PM, Graham Dumpleton
[EMAIL PROTECTED] wrote:
On Mar 29, 11:02 am, Michael Bayer [EMAIL PROTECTED] wrote:
On Mar 28, 2008, at 7:56 PM, john spurling wrote:
I added debugging to get id(session) and len(list(session)). The
session id is unique every
I am trying to use models that inherit from dict.
The models use attribute access for the sqlachemy attributes and dict style
access for gui stuff.
This allow me to do things like model[column_name].editable for gui to see if
item should be grayed
out and model.column_name for access the
If the only dict behavior you need is accessing elements with [],
another approach is that you could implement __getitem__ in your model
but not inherit from dict.
On Sat, Mar 29, 2008 at 3:08 PM, Mike Bernson [EMAIL PROTECTED] wrote:
I am trying to use models that inherit from dict.
The
what I have looks to work. I just wanted to known if there where other things
that might
be problems later.
Bobby Impollonia wrote:
If the only dict behavior you need is accessing elements with [],
another approach is that you could implement __getitem__ in your model
but not inherit from
Paul Johnston wrote:
Hi,
eng =
sqlalchemy.create_engine(mssql:///?dsn=mydsn,UID=myusername,PWD=mypass,module=pyodbc)
Try this:
eng =
sqlalchemy.create_engine(mssql://myusername:mypass@/?dsn=mydsn,module=pyodbc)
Paul
You shouldn't need to define a dsn. This should work:
10 matches
Mail list logo