[sqlalchemy] Re: correlated update across logical databases

2008-07-18 Thread Ryan Tracey
Hi Michael 2008/7/17 Michael Bayer [EMAIL PROTECTED]: On Jul 17, 2008, at 7:12 AM, Ryan Tracey wrote: Hi I would like to do a correlated update involving tables located in two logical databases on the same MySQL server. The commented out code below would work except that the mysql

[sqlalchemy] Uncharted waters? attributes with 30 chars in FreeTDS, unixODBC, PyODBC and SA 0.5beta2

2008-07-18 Thread Luis Bruno
Hello again everyone, I've been trying to move my app from Win64 to Ubuntu, while keeping a MSSQL database. Most of the deps are OS-managed: SA was stuck in 0.4.2p3 and didn't yet support mssql:///?driver=FreeTDS, and PyODBC had to be installed by hand. Anyone experienced with this? I've

[sqlalchemy] Re: correlated update across logical databases

2008-07-18 Thread Ryan Tracey
Hi Michael 2008/7/17 Michael Bayer [EMAIL PROTECTED]: On Jul 17, 2008, at 7:12 AM, Ryan Tracey wrote: Hi I would like to do a correlated update involving tables located in two logical databases on the same MySQL server. The commented out code below would work except that the mysql

[sqlalchemy] Re: Uncharted waters? attributes with 30 chars in FreeTDS, unixODBC, PyODBC and SA 0.5beta2

2008-07-18 Thread Rick Morrison
pymssql has a 30 char identifier limit, but pyodbc should work with identifiers up to 128 chars. I can't tell from your message if you're running pymssql or pyodbc, but that may be the issue. --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: Declarative 0.5 tutorial fails to create tables before insert

2008-07-18 Thread Kris Kennaway
Thanks, this wasn't clear from the tutorial. Kris On Jul 18, 6:04 am, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 17, 2008, at 4:44 PM, Kris Kennaway wrote: from sqlalchemy.orm import sessionmaker Session = sessionmaker(bind=engine) session = Session() ed_user = User('ed',

[sqlalchemy] question

2008-07-18 Thread Vladimir Iliev
hi, i have a method that returns list of (material, thickness) groups which looks like: C = [order_element_items.c.material_uuid, materials.c.name, order_element_items.c.thickness] S = select( C,

[sqlalchemy] Re: Uncharted waters? attributes with 30 chars in FreeTDS, unixODBC, PyODBC and SA 0.5beta2

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 9:35 AM, Luis Bruno wrote: Hello again everyone, I've been trying to move my app from Win64 to Ubuntu, while keeping a MSSQL database. Most of the deps are OS-managed: SA was stuck in 0.4.2p3 and didn't yet support mssql:///?driver=FreeTDS, and PyODBC had to be

[sqlalchemy] Re: correlated update across logical databases

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 5:43 AM, Ryan Tracey wrote: Just a note on something I picked up concerning stored procedures and MySQL. There's a thread (which I seem unable to locate now) which ended with the suggestion that to get SPs working with SA and MySQL one should edit databases/mysql.py and

[sqlalchemy] Re: question

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 10:07 AM, Vladimir Iliev wrote: hi, i have a method that returns list of (material, thickness) groups which looks like: C = [order_element_items.c.material_uuid, materials.c.name, order_element_items.c.thickness] S =

[sqlalchemy] Re: correlated update across logical databases

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 9:37 AM, Ryan Tracey wrote: sqlalchemy.exc.NoSuchTableError: manufacturer Just to sum up: dbengine = create_engine('mysql://u:[EMAIL PROTECTED]/schema1') meta = MetaData() meta.bind = dbengine Table('tableX', meta, autoload=True) ... Table('tableA', meta,

[sqlalchemy] Sessions + Twisted Perspective Broker

2008-07-18 Thread Jeff
Hello. First off--excellent work. I've been using SQLAlchemy for a year or so now, and I must say it's pretty awesome, but that I'm still learning it. So, on to my question. I'm using Twisted's Perspective Broker to sit in between the database on the server, and wxPython on the client. For

[sqlalchemy] Error after upgrade from 0.4.3 to 0.4.6

2008-07-18 Thread shday
I upgraded from 0.4.3 to 0.4.6 and now I get the error below when starting my TurboGears app. I'm using reflection and that fails on the first table. I had a look at the changelog and tried adding oracle_resolve_synonyms=True to that table's definition but I got another error (not shown here).

[sqlalchemy] Re: Error after upgrade from 0.4.3 to 0.4.6

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 1:32 PM, shday wrote: I upgraded from 0.4.3 to 0.4.6 and now I get the error below when starting my TurboGears app. I'm using reflection and that fails on the first table. I had a look at the changelog and tried adding oracle_resolve_synonyms=True to that table's

[sqlalchemy] Re: Sessions + Twisted Perspective Broker

2008-07-18 Thread Michael Bayer
On Jul 18, 2008, at 11:47 AM, Jeff wrote: I think that I'm using sessions wrong. I know I should be creating a new session for every request from PB-- but then how do I store a persistent copy of the Person object in the Avatar? Should I create a new session each time and use

[sqlalchemy] Overriding table columns with Python-property

2008-07-18 Thread Malthe Borch
I have a table 'test' that defines a column 'col'. I map this table on: class Mapper(object): @property def col(self): return uSome read-only value. passing exclude_properties=('col',). However, when I save and commit an instance of Mapper, I get: [snip] UnmappedColumnError: No

[sqlalchemy] Re: Overriding table columns with Python-property

2008-07-18 Thread Michael Bayer
works for me: from sqlalchemy import * from sqlalchemy.orm import * e = create_engine('sqlite://') m = MetaData(e) t= Table('t1', m, Column('id', Integer, primary_key=True), Column('col', String(50)), Column('data', String(50)), ) t.create() class Mapper(object):

[sqlalchemy] Re: Sessions + Twisted Perspective Broker

2008-07-18 Thread Jeff
Alright, merge() it is. That's kind of what I was leaning towards, as it seems that it would be the easiest (at this point) to implement. Thanks for weighing in, and thanks again for a great library. -Jeff On Jul 18, 2:12 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 18, 2008, at 11:47

[sqlalchemy] [ANN] Fixture Goes 1.0 (tool for testing with data)

2008-07-18 Thread Kumar McMillan
I've just pushed 1.0 -- the *I Heart Data* release -- of fixture, a Python module for loading and referencing test data. It is used heavily at my work in two test suites: one for the functional tests of an ETL framework and another for a Pylons + Elixir (SQLAlchemy) + Ext JS web application.