[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 11:55 am, Michael Trier mtr...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? The attributes.get_history method will return this information to you as a History record for

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 7:03 am, bool manohar.kod...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? t = Table(abc, MetaData(conn), Column(x, String), Column(y, Integer)) u = t.update().values(x='a')

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-16 Thread empty
On Oct 15, 11:50 pm, Jeff Cook cookieca...@gmail.com wrote: So, SQLAlchemy is doing something here. There probably is some incorrect code in my program, which is why I am writing this list, to figure out what that is. I'm an experienced developer and I don't appreciate your disrespect. I can

[sqlalchemy] Re: MSSQL default_schema

2008-12-23 Thread Empty
Rick, On Tue, Dec 23, 2008 at 10:32 AM, Rick Morrison rickmorri...@gmail.comwrote: I've got a few concerns with the just-committed get_default_schema_name() approach: 1) What about pre-2005 users? The query used in this patch to fetch the schema name won't work. There was not even a real

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Dec 22, 2008, at 6:36 PM, Randall Smith wrote: Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured on the database connection, you leave the schema attribute on Table blank.

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 8:46 PM, Empty mtr...@gmail.com wrote: On Dec 22, 2008, at 6:36 PM, Randall Smith wrote: Michael Bayer wrote: just FTR, the current expected behavior of default schemas is that if your tables are known to exist in the default schema configured

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith rand...@tnr.cc wrote: Michael Bayer wrote: Shouldn't mssql do something similar to Postgres here? it certainly should. Ticket 1258 Nice. Thank you very much. Michael --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: MSSQL default_schema

2008-12-22 Thread Empty
On Mon, Dec 22, 2008 at 10:45 PM, Empty mtr...@gmail.com wrote: On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith rand...@tnr.cc wrote: Michael Bayer wrote: Shouldn't mssql do something similar to Postgres here? it certainly should. Ticket 1258 Fixed in r5527. Thanks again

[sqlalchemy] Re: Example of Using SQLAlchemy to Connect to Microsoft SQL Server 2005 via Trusted Connections

2008-12-09 Thread Empty
Hello, On Tue, Dec 9, 2008 at 9:19 AM, Keyton Weissinger [EMAIL PROTECTED] wrote: Greetings all. I'm new to sqlalchemy and would REALLY like to use it at my office. I'm looking for examples and having a HECK of a time. 1. Running Python 2.5.2 on Windows XP. 2. Connecting to a local

[sqlalchemy] Re: Column('last_updated', onupdate=func.current_timestamp())

2008-12-06 Thread Empty
Column('last_updated', DateTime, PassiveDefault(func.current_timestamp ()), onupdate=func.current_timestamp()) Maybe I don't understand how onupdate works. I would like to have this column to be changed every time the row is updated, but it doesn't work. I just use something like:

[sqlalchemy] Re: Insert Column

2008-11-20 Thread Empty
b but that is not safe (if data not empty). Is there any Query in MS SQL similar to MYSQL? As far as I know you cannot purposefully order the columns through MSSQL except through the admin interface where you can drag them around. The reason this works through the admin is that it's actually

[sqlalchemy] Re: Vanilla parameterized query and results

2008-11-18 Thread Empty
Hi, On Tue, Nov 18, 2008 at 9:39 PM, TheShadow [EMAIL PROTECTED] wrote: All I need to be able to do is the following. (I don't need, can't use, and/or don't want ORM) query = 'SELECT col FROM table where col = :col' params = {'col':1} # and/or params = [{'col':1},{'col':2}] OR query =

[sqlalchemy] Re: SQLAlchemy 0.5.0rc3 Released

2008-11-08 Thread empty
there was another, which was the ensure/insure confusion.  J Ellis   slapped me down a long time ago on that one and I've since stopped   selling insurance. Found a few more and corrected. You consistently spell propagate as propigate.   Is there any way we can get an i/a switch in

[sqlalchemy] Re: mssql reflection fk issue

2008-11-08 Thread empty
When reflecting a MSSQL table with a foreign key, the referenced table fails to load with the error: sqlalchemy.exc.NoSuchTableError: [referenced_table] Give the latest trunk a try and let me know. It should have been corrected in r5266. Thanks, Michael

[sqlalchemy] Re: from a db schema to sqlalchemy tables

2008-10-30 Thread Empty
There's this: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode Which will take the schema directly and create the classes. May not work for you. Michael On Thu, Oct 30, 2008 at 12:14 PM, Michele Simionato [EMAIL PROTECTED] wrote: Is there some utility to convert a schema file

[sqlalchemy] Re: minor documentation typo

2008-10-29 Thread empty
Jon, On Oct 27, 3:28 pm, Jon [EMAIL PROTECTED] wrote: In the docs section for MetaData, under drop_all, the following text appears:     Defaults to True, don't issue CREATEs for tables already present in the target database. I think you mean s/CREATE/DROP/ This bit is corrected in r5212.

[sqlalchemy] Re: Missing 'match' documentation?

2008-10-20 Thread Empty
Hello, On Mon, Oct 20, 2008 at 10:10 AM, sandro dentella [EMAIL PROTECTED] wrote: Hi, I think I don't see documentation on the 'match' operator that works differently according to db backend. Well it kind of didn't make sense to duplicate the individual database documentation on how they

[sqlalchemy] Re: executemany upate

2008-10-18 Thread Empty
Hi, Is there a way to do executemany() semantic updates? Suppose I have a list of employee id's and I want to do something like: ids = [1, 2, 3, 4, 5, 6] session.execute( tbl_employees.update(tbl_employees.c.id == ids), tbl_employees.c.status=you're fired ) Just us the in_ syntax

[sqlalchemy] Re: limit the set of returned columns

2008-10-07 Thread Empty
Hi, Yesterday I was searching this group and the SA 5.0 doc to get something working. Somewere I came across an option to specify the columnames to return You can specify the column names as part of the query, like session.query(User.name, User.phone). Filename, permissions and

[sqlalchemy] Re: MSSQL Failing deletes with subquery + schema

2008-10-06 Thread Empty
Hi Is there any chance someone can look at ticket 973? http://www.sqlalchemy.org/trac/ticket/973 This is quite important to me, hitting the bug with a production app. I've got a very hacky fix, which just disables the table aliasing, but I don't think that's good enough to commit. I have

[sqlalchemy] Re: Declarative documentation

2008-09-17 Thread Empty
Hi Doug, I'm a new user (like this week) of SqlAlchemy and I'm trying to find more information about using the Declarative system. In particular I'm trying to build a hierarchical table with one-to-many relationships within the table. So if anyone knows where there might be some additional

[sqlalchemy] Re: SQLAlchemy 0.5.0 Release Candidate 1 Released

2008-09-11 Thread empty
On Sep 11, 5:42 pm, Michael Bayer [EMAIL PROTECTED] wrote: Hey list - I've just put out 0.5rc1.   This release is *great*, as I am using it   heavily every day for a project here - it's got my personal seal of   approval.  0.5 truly rocks in general.    In my particular   application, I'm

[sqlalchemy] Re: SqlAchemy and OpenOffice

2008-08-26 Thread Empty
I have created a manual and give example on how to use sqlalchemy and openoffice together to create documents. The code shows you how to use openoffice as a document template and fill in the data from the database. I basically use Find and Replace function of openoffice to do the template

[sqlalchemy] Re: Query to get all items from a table which have no reference to another table?

2008-08-25 Thread Empty
Hello Felix, No I want to get all items from table A where no matching item in table B exists. I'm aware that this would be very easy if table A stores the foreign key. SQLAlchemy supports the NOT EXISTS syntax through the any() / has() methods. You should be able to do something like this:

[sqlalchemy] Re: Need help with the shard session and query get function

2008-07-05 Thread Empty
Jay, I looked at your code in detail and what I'm seeing is that the lookups are not even getting populated. It looks like there's no binding to an engine there, which points to a problem with your shard_chooser. What I would do is try to simplify it a bit. First realize that your lookup

[sqlalchemy] Re: result as the dict()

2008-07-05 Thread Empty
Hi Russell, On Sun, Jul 6, 2008 at 12:32 AM, Russell Warren [EMAIL PROTECTED] wrote: I also had this issue and searched around for an answer, but found nothing. In my case I;m using the orm and wanted to have those object properties that map to a table be wrapped up in a dict. The new SQLA

[sqlalchemy] Query Clone Issue

2008-06-14 Thread empty
Base.metadata.create_all() session.add_all([Category(name='zzeek'), Category(name='jek'), Category(name='empty')]) # order ascending c1 = session.query(Category).order_by(asc(Category.name)) assert [u'empty', u'jek', u'zzeek'] == [c.name for c in c1] # clone the query

[sqlalchemy] Re: sqlalchemy 0.4.5 released

2008-04-07 Thread Empty
i.e. session.query([MappedObject.id, MappedObject.name]).filter(...).all() I actually thought of this mapping as well. Only because it seemed consistent with select. Granted I don't understand all the reasons why it could / could not work. That said I'm happy with values as