[sqlalchemy] Re: altering tables

2009-02-11 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of mhearne808[insert-at-sign-here]gmail[insert-dot-here]com Sent: 10 February 2009 19:13 To: sqlalchemy Subject: [sqlalchemy] altering tables [snip] I'd like to update the

[sqlalchemy] Re: referencing table in other databases inside a MSSQL server

2009-02-11 Thread Clovis Fabricio
2009/2/10 Michael Bayer mike...@zzzcomputing.com: Question is: How can I do that in a sa.Table constructor? sa.Table('DataB.dbo.TableInB', metadata, ) sa.Table('TableInB', metadata, , schema='DataB.dbo') And both failed. Is there a way to map tables from both databases using the same

[sqlalchemy] Re: referencing table in other databases inside a MSSQL server

2009-02-11 Thread Clovis Fabricio
2009/2/11 Clovis Fabricio nos...@gmail.com: 2009/2/10 Michael Bayer mike...@zzzcomputing.com: Question is: How can I do that in a sa.Table constructor? sa.Table('DataB.dbo.TableInB', metadata, ) sa.Table('TableInB', metadata, , schema='DataB.dbo') And both failed. Is there a way to

[sqlalchemy] Re: referencing table in other databases inside a MSSQL server

2009-02-11 Thread Michael Bayer
On Feb 11, 2009, at 8:43 AM, Clovis Fabricio wrote: 2009/2/11 Clovis Fabricio nos...@gmail.com: 2009/2/10 Michael Bayer mike...@zzzcomputing.com: Question is: How can I do that in a sa.Table constructor? sa.Table('DataB.dbo.TableInB', metadata, ) sa.Table('TableInB', metadata, ,

[sqlalchemy] Problem of Unicode Strings

2009-02-11 Thread 一首诗
Hi all, I'm using sqlalchemy as my ORM library and it works fines until today one of my test case fail === sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8- bit bytestrings unless you use a text_factory that can interpret

[sqlalchemy] You must not use 8-bit bytestrings ??

2009-02-11 Thread 一首诗
Hi all, I'm using sqlalchemy as my ORM library and it works fines until today one of my test case fail === sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8- bit bytestrings unless you use a text_factory that can interpret

[sqlalchemy] Re: Problem of Unicode Strings

2009-02-11 Thread Michael Bayer
On Feb 11, 2009, at 8:05 AM, 一首诗 wrote: Hi all, I'm using sqlalchemy as my ORM library and it works fines until today one of my test case fail === sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8- bit bytestrings

[sqlalchemy] Re: referencing table in other databases inside a MSSQL server

2009-02-11 Thread Rick Morrison
The dotted schema notation discussed in that ticket should fix the issue, yes. Meantime a short-term workaround might be to define a view in the local database that does the cross-database reference and use the view in your query. --~--~-~--~~~---~--~~ You

[sqlalchemy] Attribute events

2009-02-11 Thread Mike Bernson
I am trying to move from 0.5beta4 to 0.5.2 The attribute events are giving me a problem The code worked in 0.5beta4 and now is broken. class base(object): __sa_instrumentation_manager__ = SetListener listener = ReceiveEvents() class SetListener(InstrumentationManager): def

[sqlalchemy] Re: referencing table in other databases inside a MSSQL server

2009-02-11 Thread Michael Bayer
Michael Trier wrote: SQL 2000 doesn't really support schemas, but the idea of an owner. There's a ticket in trac that discussed ideas around how we handle the owner segment for 2000 and before. MSSQL dialect should use the schema, owner, and name of a table to compose the table's name

[sqlalchemy] Re: Attribute events

2009-02-11 Thread Michael Bayer
attribute extensions can be passed to any column_property() or relation() now.There's no hook at the moment in the attribute extension API which fires at the point at which the AttributeImpl is assembled. Mike Bernson wrote: I am trying to move from 0.5beta4 to 0.5.2 The attribute

[sqlalchemy] Re: Attribute events

2009-02-11 Thread Mike Bernson
What I am trying to do is get the events for when an attribute was modified. This code was used to register that I wanted ReceiveEvents to get called when attributes where modified. Has this been removed between 0.5.beta4 and 0.5.2. The example program in

[sqlalchemy] Pros and cons of flushing subset of session's objects

2009-02-11 Thread Angri
Michael, I see you dont like the ability to flush only specific objects as it brings more troubles than profit. I agree in almoust all cases, but... Let me show where does it need for me. It is not so rare case when developer needs to catch creating or updating instance. In some orm's (not hard

[sqlalchemy] Re: Pros and cons of flushing subset of session's objects

2009-02-11 Thread az
On Wednesday 11 February 2009 23:07:29 Angri wrote: Michael, I see you dont like the ability to flush only specific objects how about a group of objects? say whole island in the dependency graph? --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: Pros and cons of flushing subset of session's objects

2009-02-11 Thread Michael Bayer
On Feb 11, 2009, at 4:07 PM, Angri wrote: Michael, I see you dont like the ability to flush only specific objects as it brings more troubles than profit. I agree in almoust all cases, but... Let me show where does it need for me. It is not so rare case when developer needs to catch

[sqlalchemy] Re: Pros and cons of flushing subset of session's objects

2009-02-11 Thread Angri
On 12 фев, 00:55, Michael Bayer mike...@zzzcomputing.com wrote: yeah, youre using it exactly for what you should not be using it for, to approximate the save() method on an active-record system. building your whole app around a fake save() paradigm is not at all how SQLA's unit of work was

[sqlalchemy] copying data from one DB to another

2009-02-11 Thread Piotr Ozarowski
Hi, Here's what I wrote to create PostgreSQL's data backup in SQLite: (yes, I know pg_dump, I just want to create/use it in SQLAlchemy) | new_engine = sqlalchemy.create_engine(sqlite:///offline.db) | metadata.create_all(bind=new_engine) | | # SQLite doesn't care about foreign keys much so we

[sqlalchemy] Re: copying data from one DB to another

2009-02-11 Thread az
any2any: see files in http://dbcook.svn.sourceforge.net/viewvc/dbcook/trunk/dbcook/misc/metadata/ copyall, copydata i haven't touched it for a while, see if still works. On Thursday 12 February 2009 01:05:47 Piotr Ozarowski wrote: Hi, Here's what I wrote to create PostgreSQL's data backup in

[sqlalchemy] mysql.has_table() problem with MySQL-python 1.2.3b1

2009-02-11 Thread Jacob Gabrielson
Hi, I'm not sure if you're interested in this sort of report, but what the heck. When I try to do a metadata.create_all(engine) on my relatively simple 'declarative' class (see widget.py below), I get the backtrace below if I'm using the latest (test) MySQL-python driver (1.2.3b1) (it works fine