RE: [sqlalchemy] Possible bug with subqueryload

2011-09-28 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: 27 September 2011 19:37 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Possible bug with subqueryload On Sep 27, 2011, at 1:16 PM, King Simon

[sqlalchemy] Possible bug with subqueryload

2011-09-27 Thread King Simon-NFHD78
Hi, I think there may be a bug in the interaction between 'subqueryload' and having a default 'order_by' defined on a mapped class. When the subquery is run, it looks like the ORDER BY is being placed on the outer query, whereas it should be on the inner query. The full test case is below, but

RE: [sqlalchemy] Possible bug with subqueryload

2011-09-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: 27 September 2011 16:24 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Possible bug with subqueryload Hi Simon - yeah that looks pretty buglike

RE: [sqlalchemy] Bulk creation of columns

2011-09-22 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of pravin battula Sent: 21 September 2011 12:54 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Bulk creation of columns Hi, How can i create columns in bulk using

RE: [sqlalchemy] Re: Error while using CAST

2011-09-14 Thread King Simon-NFHD78
Does this work instead: table.update().values(empno = cast(table.c.empno,Integer)).execute() ie. a bare 'empno' inside your cast expression is just referring to a python variable 'empno', which you've probably set to the value 'testing' at some other point in your code. You need the column

RE: [sqlalchemy] data driven schema in sqlalchemy

2011-08-05 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of espresso maker Sent: 05 August 2011 06:19 To: sqlalchemy Subject: [sqlalchemy] data driven schema in sqlalchemy Hi there, I have a data driven database schema that I am trying

RE: [sqlalchemy] update existing row

2011-08-01 Thread King Simon-NFHD78
vitsin wrote: hi, can't figure out why raw SQL works fine, but update() is not working: 1.working raw SQL: self.session.execute(update public.my_table set status='L',updated_at=now() where my_name='%s' % (self.my_name)) 2.non working update() from Alchemy: s = aliased(MyTable) query =

RE: [sqlalchemy] Updating records in table not working

2011-07-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of jos.carpente...@yahoo.com Sent: 26 July 2011 18:27 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Updating records in table not working I'm using Postgres as a database.

RE: RE: [sqlalchemy] Updating records in table not working

2011-07-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Gunnlaugur Briem Sent: 27 July 2011 10:36 To: sqlalchemy@googlegroups.com Subject: Re: RE: [sqlalchemy] Updating records in table not working On Wednesday, 27 July 2011 08:23:14

RE: [sqlalchemy] engine.echo not working as expected

2011-07-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Mike Conley Sent: 27 July 2011 17:43 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] engine.echo not working as expected Under 0.5 I was able to turn echo on and off as

RE: [sqlalchemy] how to get last record from a resultset

2011-07-20 Thread King Simon-NFHD78
If you don't have something consistent to sort by, then I'm not sure that the last record is meaningful, is it? If you have 10 rows with the same voucher code and account code (and there is nothing else to uniquely identify them, such as a more precise timestamp, or an auto-incrementing ID),

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-19 Thread King Simon-NFHD78
Eduardo wrote: /.../.../python2.6/site-packages/SQLAlchemy-0.6.5- py2.6.egg/sqlalchemy/ dialects/postgresql/psycopg2.py, line 234, in dbapi psycopg = __import__('psycopg2') ImportError: No module named psycopg2 The module psycopg2 is already installed in the site-packages directory. I

RE: [sqlalchemy] Question about sqlalchemy inserts and deletes order in a transaction

2011-07-19 Thread King Simon-NFHD78
ammar azif wrote: Hi, The code that I am working on deletes rows from table A that are based on a certain query and then recreates these rows based on entries supplied by a csv file. Table A is referenced by table B. My question is, how does sql alchemy manage inserts and deletes in a

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-18 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Eduardo Sent: 18 July 2011 14:12 To: sqlalchemy Subject: [sqlalchemy] Re: information about filed create_engine I dont get any log. The access strings from the local and wsgi

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-18 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Eduardo Sent: 18 July 2011 15:54 To: sqlalchemy Subject: [sqlalchemy] Re: information about filed create_engine Yes, I use wsgi server of the python library bottle and I don't

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote On Jul 13, 7:11 pm, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote Hi, I am trying to prompt an answer from a database after failed create_engine command. I searched through the source code and I found TypeError, and ValueError returns

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information regarding the failure!) Try turning on SQL logging (either by passing echo='debug') to create_engine, or by

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information regarding the failure!) Try turning on SQL logging (either by passing echo='debug') to create_engine, or by

RE: [sqlalchemy] Re: information about filed create_engine

2011-07-14 Thread King Simon-NFHD78
Eduardo wrote: On Jul 14, 10:49 am, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: Eduardo wrote When I use the same script with a standalone application it works but when I try to run it as a wsgi application it fails (wsgi logs does not contain any information

RE: [sqlalchemy] information about filed create_engine

2011-07-13 Thread King Simon-NFHD78
Eduardo wrote Hi, I am trying to prompt an answer from a database after failed create_engine command. I searched through the source code and I found TypeError, and ValueError returns but they relate (if I understood well only to the access parameters). My problem is that I am sure that my

RE: [sqlalchemy] relationship problem

2011-07-12 Thread King Simon-NFHD78
mik wrote: Hello, I am trying to use sqlalchemy with oracle, here is my code: from sqlalchemy import * from sqlalchemy.orm import sessionmaker, mapper, relationship class Activite(object): pass class Famprod(object): pass engine = create_engine('oracle://login/paswd@db',

RE: [sqlalchemy] In case of joinedload_all how do I order by on a columns of those relations

2011-06-29 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Marc Van Olmen Sent: 29 June 2011 04:19 To: sqlalchemy Subject: [sqlalchemy] In case of joinedload_all how do I order by on a columns of those relations Hi I'm trying to

RE: [sqlalchemy] (OperationalError) (1066, Not unique table/alias: '...') when selecting only from a joined table

2011-06-28 Thread King Simon-NFHD78
Michael Bayer wrote: - I am loathe to reference the 0.5 docs as people keep finding them and thinking they are current, but an example of this is at http://www.sqlalchemy.org/docs/05/ormtutorial.html#querying-with- joins (Note to people reading this: these are the *OLD DOCS* regarding 0.5;

RE: [sqlalchemy] dynamically set table_name at runtime

2011-06-21 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Cody Django Sent: 20 June 2011 19:37 To: sqlalchemy Subject: [sqlalchemy] dynamically set table_name at runtime Hello! I would like to dynamically set/change the table that is

RE: [sqlalchemy] Accessing several databases

2011-06-16 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Julian J. M. Sent: 16 June 2011 11:43 To: sqlalchemy Subject: [sqlalchemy] Accessing several databases Hello, I'm intending to use sqalchemy with orm for loading and storing

RE: [sqlalchemy] mapping a class linked with two other classes (AttributeError: 'str' object has no attribute '_sa_instance_state')

2011-06-16 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Jules Stevenson Sent: 16 June 2011 08:44 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] mapping a class linked with two other classes (AttributeError: 'str' object has no

RE: [sqlalchemy] General questions of a newbee

2011-06-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Knack Sent: 14 June 2011 18:43 To: sqlalchemy Subject: [sqlalchemy] General questions of a newbee Hi guys, I've done some programming, but I'm new to RDBMS and ORMs. I've read

RE: [sqlalchemy] db name from session?

2011-06-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Chris Withers Sent: 15 June 2011 10:48 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] db name from session? Hi All, If I have a session object, what's the correct way

RE: [sqlalchemy] question re using the session object

2011-06-14 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of robert rottermann Sent: 14 June 2011 10:53 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] question re using the session object hi there, for a zope website I am using

RE: [sqlalchemy] Re: Trying to query a relationship of a relationship

2011-06-09 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Jules Stevenson Sent: 09 June 2011 08:53 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: Trying to query a relationship of a relationship Sorry, for the spamming, code

RE: [sqlalchemy] Filtered backref

2011-06-09 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Joril Sent: 08 June 2011 22:41 To: sqlalchemy Subject: [sqlalchemy] Filtered backref Hi everyone! Is it possible to have a many-to-one declarative relation between two classes

RE: [sqlalchemy] Appending a where clause to a query

2011-04-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Luka Novsak Sent: 27 April 2011 05:32 To: sqlalchemy Subject: [sqlalchemy] Appending a where clause to a query The docs on Select's where() method say: return a new select()

RE: [sqlalchemy] Best design for commits?

2011-04-20 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Aviv Giladi Sent: 20 April 2011 15:53 To: sqlalchemy Subject: [sqlalchemy] Best design for commits? Hey guys, I have a Pylons back-end running on SQLAlchemy. I have a script

RE: [sqlalchemy] API that allows me to do additional database operations just before insert execution for SQL Expression

2011-04-19 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of bool Sent: 19 April 2011 14:16 To: sqlalchemy Subject: [sqlalchemy] API that allows me to do additional database operations just before insert execution for SQL Expression Is

RE: [sqlalchemy] Re: Context based execution

2011-04-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of bool Sent: 15 April 2011 14:41 To: sqlalchemy Subject: [sqlalchemy] Re: Context based execution Hi, Thanks a lot. Can someone answer this question also

RE: [sqlalchemy] Create a one-to-many relationship using association object with two foreign key primary keys

2011-04-14 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of frankentux Sent: 14 April 2011 14:42 To: sqlalchemy Subject: [sqlalchemy] Create a one-to-many relationship using association object with two foreign key primary keys I have

RE: [sqlalchemy] Two Objects, One Table and the inverse

2011-04-05 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Michael Bayer Sent: 05 April 2011 18:38 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Two Objects, One Table and the inverse On Apr 5, 2011, at 12:30 PM, Israel Ben

RE: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could not find table with which to generate a foreign key

2011-03-30 Thread King Simon-NFHD78
This is just the way Python works - code inside a module is only executed when that module is imported. If you don't import myapp.models.notes, then the class definitions never get executed. One solution is to import all the sub-modules in your bootstrap.py before calling create_all. Another is

RE: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could not find table with which to generate a foreign key

2011-03-30 Thread King Simon-NFHD78
of an application works without having to import all the modules in, say, myapp.models.__init__.py Suggestions are welcome, though i'm considering the question answered Thanks alot and Regards, On Mar 30, 4:39 pm, King Simon-NFHD78 simon.k...@motorolasolutions.com wrote: This is just the way Python works

RE: [sqlalchemy] trouble with metaclass

2011-03-17 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of farcat Sent: 16 March 2011 21:01 To: sqlalchemy Subject: [sqlalchemy] trouble with metaclass I have an error i cant figure out (likely a beginners error):

RE: [sqlalchemy] In-memory object duplication

2011-03-17 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Jacques Naude Sent: 17 March 2011 12:32 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] In-memory object duplication Hi, Simon Thanks for the quick response.

RE: [sqlalchemy] In-memory object duplication

2011-03-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of jln Sent: 15 March 2011 16:37 To: sqlalchemy Subject: [sqlalchemy] In-memory object duplication [SNIP] statuses = OneToMany('DocumentStatus', inverse='doc', cascade='all,

RE: [sqlalchemy] Simple Join failing

2010-10-05 Thread King Simon-NFHD78
Warwick Prince wrote: Hi All I have what I hope is a very simple question; Just started experimenting with joins, so I tried a very basic test and got a fail that I don't understand. It appears that SA is creating bad SQL, but I'm sure it's something I'm missing.. Here's what I did;

RE: [sqlalchemy] Simple Join failing

2010-10-05 Thread King Simon-NFHD78
Warwick Prince wrote: Hi Simon Thanks for that - I knew it was something wrong with the approach but simply could not pick it!Back to the test bench for another go :-) Cheers Warwick P.S. OK - I have to ask - when and how (why?) do I do the .join on the query? ;-) In SQL,

RE: [sqlalchemy] Re: Python's reserved keywords as column names

2010-09-10 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Andrey Semyonov Sent: 10 September 2010 14:35 To: sqlalchemy Subject: [sqlalchemy] Re: Python's reserved keywords as column names On 10 сен, 17:15, King Simon-NFHD78 simon.k

RE: [sqlalchemy] update a relation from its id

2010-09-02 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of chaouche yacine Sent: 02 September 2010 11:02 To: sqlalchemy googlegroups Subject: [sqlalchemy] update a relation from its id Hello group, Suppose A has a ManyToOne relation

RE: [sqlalchemy] Session.merge and multiple databases

2010-08-25 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Raf Geens Sent: 25 August 2010 16:48 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Session.merge and multiple databases On 25/08/2010 17:15, Michael Bayer wrote:

RE: [sqlalchemy] Which columns changing during orm commit?

2010-08-20 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Hipp Sent: 19 August 2010 23:39 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Which columns changing during orm commit? On 8/19/2010 5:24 AM, Chris Withers

RE: [sqlalchemy] Re: To select only some columns from some tables using session object, relation many-to-many

2010-08-04 Thread King Simon-NFHD78
Alvaro Reinoso wrote: It works out, thank you! How could I just retrieve some columns from both tables? For example, if I try to select some columns from Item and Channel, I get class 'sqlalchemy.util.NamedTuple' when I'd like to get a channel type with its items: result =

RE: [sqlalchemy] Re: open session blocks metadata create_all method

2010-07-29 Thread King Simon-NFHD78
On Wed, 28 Jul 2010 15:17:09 +0530 (IST), Faheem Mitha fah...@email.unc.edu wrote: Hi, When calling create_all on a metadata instance after a session has alrady been opened causes the create_all to hang, I assume because the session is blocking the create_all. Is there

RE: [sqlalchemy] Problem with Joined Table inheritance

2010-07-13 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Jules Stevenson Sent: 13 July 2010 15:01 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Problem with Joined Table inheritance Apologies for any stupidity, but I'm

RE: [sqlalchemy] Using the declarative base across projects

2010-07-08 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of thatsanicehatyouh...@mac.com Sent: 07 July 2010 20:33 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Using the declarative base across projects Hi Lance, Thanks

RE: [sqlalchemy] Comparable properties

2010-07-08 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Chris Withers Sent: 08 July 2010 09:28 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Comparable properties Oliver Beattie wrote: @property def

RE: [sqlalchemy] models in different packages, often declaratively defined

2010-07-02 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Chris Withers Sent: 01 July 2010 19:17 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] models in different packages, often declaratively defined Hi All, Suppose I

RE: [sqlalchemy] cross-database joins with MySQL

2010-06-29 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Chris Withers Sent: 29 June 2010 10:28 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] cross-database joins with MySQL Michael Bayer wrote: We have engines set up

RE: [sqlalchemy] Referential integrity actions are not doing what I want

2010-06-22 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of exhuma.twn Sent: 22 June 2010 14:27 To: sqlalchemy Subject: [sqlalchemy] Referential integrity actions are not doing what I want Hi, I have a table of items, where each

RE: [sqlalchemy] help please

2010-06-10 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Aref Sent: 10 June 2010 02:40 To: sqlalchemy Subject: [sqlalchemy] help please Hello All, I just began learning sqlalchemy and am not quite used to it yet so please excuse

RE: [sqlalchemy] SA on MySQL 3.23

2010-06-04 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: 03 June 2010 19:38 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] SA on MySQL 3.23 On Jun 3, 2010, at 1:15 PM, King Simon-NFHD78 wrote: Hi

RE: [sqlalchemy] SA on MySQL 3.23

2010-06-04 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: 04 June 2010 14:42 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] SA on MySQL 3.23 On Jun 4, 2010, at 6:54 AM, King Simon-NFHD78 wrote

RE: [sqlalchemy] reflecting existing databases with no a priori knowledge of their structure

2010-06-03 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Harry Percival Sent: 03 June 2010 16:24 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] reflecting existing databases with no a priori knowledge of their structure Hi

[sqlalchemy] SA on MySQL 3.23

2010-06-03 Thread King Simon-NFHD78
Hi, According to sqlalchemy/dialects/mysql/base.py, MySQL v3.23 should be supported in some form. However, with SA 0.6.1 and MySQL 3.23.58, I get the following error: import sqlalchemy as sa e = sa.create_engine('mysql://user:passw...@host') e.execute('select Hello World') Traceback (most

RE: [sqlalchemy] Re: For each begin_nested() call, a corresponding rollback() or commit() must be issued.

2010-05-28 Thread King Simon-NFHD78
Kent wrote: [SNIP] I'm fine with how SQLA is designed, it isn't really a SQLA issue, I was just appealing to you to see if you could think of a workaround I believe the problem is in the framework tools we are using, whether it is Zope or TG. (I've posted to zope group now to see if

RE: [sqlalchemy] Use a foreign key mapping to get data from the other table using Python and SQLAlchemy.

2010-05-27 Thread King Simon-NFHD78
Az wrote: [SNIP] The following code maps these classes to respective database tables. # SQLAlchemy database transmutation engine = create_engine('sqlite:///:memory:', echo=False) metadata = MetaData() customers_table = Table('customers', metadata,

RE: [sqlalchemy] session lifecycle and wsgi

2010-04-28 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Chris Withers Sent: 28 April 2010 14:37 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] session lifecycle and wsgi Hi All, I'm still trying to get an answer on this...

RE: [sqlalchemy] declarative commit hook - onCommit()?

2010-04-28 Thread King Simon-NFHD78
Daniel Robbins wrote: On Wed, Apr 28, 2010 at 10:04 AM, Chris Withers ch...@simplistix.co.uk wrote: Daniel Robbins wrote: Let's say that when a database record is added or updated, I need to perform some arbitrary action (in my case, ensuring that data in other tables is

RE: [sqlalchemy] Storing Nested Lists

2010-04-26 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of greg Sent: 25 April 2010 22:59 To: sqlalchemy Subject: [sqlalchemy] Storing Nested Lists Hi All, I'm new to sqlalchemy. I've been reading the documentation and group

RE: [sqlalchemy] Is the mapper must have a primary_key?

2010-04-19 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Gaicitadie Sent: 16 April 2010 20:06 To: sqlalchemy Subject: [sqlalchemy] Is the mapper must have a primary_key? #!/usr/bin/python # -*- coding: UTF-8 -*- from sqlalchemy

RE: [sqlalchemy] cls._state / cls._state.get('original') class 'sqlalchemy.orm.attributes.CommittedState'

2010-04-16 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of jose soares Sent: 16 April 2010 11:03 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] cls._state / cls._state.get('original') class

RE: [sqlalchemy] flush(), save(), delete()

2010-04-15 Thread King Simon-NFHD78
Jo wrote: [SNIP] and- In [13]: aa=Anagrafica.get(111) In [14]: aa.delete() In [15]: aa.flush() - but in version 0.6 I can't find flush(), save(),

RE: [sqlalchemy] further restricting a query provided as raw sql

2010-04-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Mariano Mara Sent: 15 April 2010 16:20 To: sqlalchemy Subject: Re: [sqlalchemy] further restricting a query provided as raw sql Excerpts from Chris Withers's message of Thu

RE: [sqlalchemy] Re: SQLAlchemy, Twisted, and sAsync

2010-03-26 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Matthew Williams Sent: 26 March 2010 12:10 To: sqlalchemy@googlegroups.com; twisted-pyt...@twistedmatrix.com Subject: [sqlalchemy] Re: SQLAlchemy, Twisted, and sAsync On Mar

RE: [sqlalchemy] recommended declarative method design pattern for sessions

2010-03-22 Thread King Simon-NFHD78
Daniel Robbins wrote: Hi All, One of the things that doesn't seem to be covered in the docs, and that I'm currently trying to figure out, is the recommended design pattern to use for managing sessions from declarative methods calls. Consider a declarative class User, where I want to

RE: [sqlalchemy] extended use of VALUES command

2010-03-02 Thread King Simon-NFHD78
Manlio Perillo wrote: Hi. Is it possible, in SQLAlchemy, to express this query? CREATE TEMP TABLE foo ( x INTEGER, y INTEGER ); INSERT INTO foo VALUES (10, 11); INSERT INTO foo VALUES (1, 2); manlio= SELECT * FROM foo WHERE (x, y) in (VALUES (1, 2), (3, 4)); x | y -

RE: [sqlalchemy] reflecting schema just on a single table

2010-02-24 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Paul Rigor (uci) Sent: 24 February 2010 00:23 To: sqlalchemy Subject: [sqlalchemy] reflecting schema just on a single table Hi, Is there anyway to use a metadata object just

RE: [sqlalchemy] Oracle Views/DatabaseLink and declarative

2010-02-24 Thread King Simon-NFHD78
Christian Klinger wrote: [SNIP] Ok now a second table comes into the game. The name of this table is BTeilnehmer. As you can see this table has a ForeignKey to Unternehmen.mnr. I use a seperate metadata BaseC for it because i want to create this table. Hi, I don't know if the seperate

RE: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed?

2010-02-04 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of werner Sent: 04 February 2010 09:41 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Using a arbitrary select mapper/class in a relation - is this allowed? On

RE: [sqlalchemy] Another tutorial!

2010-02-04 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Mike Driscoll Sent: 04 February 2010 03:34 To: sqlalchemy Subject: [sqlalchemy] Another tutorial! Hi, I just finished up a tutorial series on SqlAlchemy that I thought I'd

RE: [sqlalchemy] Re: Another tutorial!

2010-02-04 Thread King Simon-NFHD78
Mike Driscoll wrote: On Feb 4, 8:30 am, Mike Driscoll kyoso...@gmail.com wrote: On Feb 4, 4:24 am, King Simon-NFHD78 simon.k...@motorola.com wrote: [SNIP] Not a serious blunder, but I think there may be a small mistake in part 2, where you describe updating an email address

RE: [sqlalchemy] Re: Another tutorial!

2010-02-04 Thread King Simon-NFHD78
Mike Driscoll wrote: Thanks Simon! That made sense. I've fixed my example to match what you said. Sorry about that. - Mike No problem. I'm afraid you still have a typo though. You have: addresses[0].email_address = Address(pr...@marvel.com) Whereas you want:

RE: [sqlalchemy] Getting useful error messages

2010-02-03 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Adam Tauno Williams Sent: 03 February 2010 12:17 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Getting useful error messages Attempting, again, to get a declarative

RE: [sqlalchemy] problem when executing multiple insert statements and boolean type

2010-01-29 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Manlio Perillo Sent: 29 January 2010 13:15 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] problem when executing multiple insert statements and boolean type -BEGIN

RE: [sqlalchemy] Map to Arbitrary Select Using Raw SQL

2010-01-27 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: 27 January 2010 16:31 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Map to Arbitrary Select Using Raw SQL Michael Chambliss wrote: Hey Michael

RE: [sqlalchemy] Re: Is it possible to narrow down the generated query in SQLAlchemy if it was created via query_property?

2010-01-26 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Boda Cydo Sent: 26 January 2010 01:35 To: sqlalchemy Subject: [sqlalchemy] Re: Is it possible to narrow down the generated query in SQLAlchemy if it was created via

RE: [sqlalchemy] any way to pre cook a monster query?

2010-01-26 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Chris Withers Sent: 26 January 2010 09:13 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] any way to pre cook a monster query? Hi All, I have a few monster queries like

RE: [sqlalchemy] dynamic_loader

2010-01-25 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of werner Sent: 25 January 2010 13:37 To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] dynamic_loader On 24/01/2010 16:57, werner wrote: ... Next thing is to make

[sqlalchemy] Re: column label and order by

2009-11-17 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of rajasekhar911 Sent: 17 November 2009 11:32 To: sqlalchemy Subject: [sqlalchemy] Re: column label and order by anyone?? On Nov 14, 6:48 pm, rajasekhar911

[sqlalchemy] Re: bad result when querying for null values (in pk at least)

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Mike Conley Sent: 15 October 2009 14:43 To: sqlalchemy@googlegroups.com Cc: SQLElixir Subject: [sqlalchemy] Re: bad result when querying for null values (in pk at least)

[sqlalchemy] Re: Declerative Relation trouble

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 15 October 2009 14:42 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Declerative Relation trouble Hi All, I am having a very bad day (or two

[sqlalchemy] Re: Declerative Relation trouble

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 15 October 2009 15:38 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: Declerative Relation trouble Hi Simon, (I do things a little

[sqlalchemy] Re: Declerative Relation trouble

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 15 October 2009 15:55 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: Declerative Relation trouble I downgraded SQLA to version 0.5.5, no

[sqlalchemy] Re: [runs one one installation not on the other] Declerative Relation trouble

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 15 October 2009 16:21 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re:[runs one one installation not on the other] Declerative Relation trouble

[sqlalchemy] Re: [runs one one installation not on the other] Declerative Relation trouble

2009-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 15 October 2009 16:27 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: [runs one one installation not on the other] Declerative Relation trouble

[sqlalchemy] Re: ORM Many to Many Across Two Databases

2009-10-14 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Luke Arno Sent: 14 October 2009 16:41 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: ORM Many to Many Across Two Databases It looks like if I put the relation on the

[sqlalchemy] Re: Duck-typing style of relations

2009-10-09 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Yannick Gingras Sent: 09 October 2009 14:43 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Duck-typing style of relations Greetings Alchemists, this is more of a

[sqlalchemy] Re: Select from multiple databases

2009-10-02 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of kkapron Sent: 01 October 2009 21:27 To: sqlalchemy Subject: [sqlalchemy] Select from multiple databases Hello, I'm a beginner in sqlalchemy and I've got a problem with select

[sqlalchemy] Re: Bypass checking to database structure (metadata.create_all)

2009-10-01 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Christian Démolis Sent: 01 October 2009 10:40 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Bypass checking to database structure (metadata.create_all) Hi again,

[sqlalchemy] Re: unexpected chained relations and append behaviour

2009-09-24 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Crusty Sent: 24 September 2009 16:16 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: unexpected chained relations and append behaviour Hello Simon, thanks for

[sqlalchemy] Re: unexpected chained relations and append behaviour

2009-09-23 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Crusty Sent: 23 September 2009 15:48 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] unexpected chained relations and append behaviour Hello everyone, I have a

[sqlalchemy] Re: Pre-commit validation spanning multiple tables/ORM classes

2009-09-22 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Randall Nortman Sent: 22 September 2009 16:31 To: sqlalchemy Subject: [sqlalchemy] Pre-commit validation spanning multiple tables/ORM classes [SNIP] So if I do this with

[sqlalchemy] Re: getting data from primary keys

2009-09-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of C.T. Matsumoto Sent: 15 September 2009 07:21 To: sqlalchemy@googlegroups.com Subject: [sqlalchemy] Re: getting data from primary keys That did the trick. Thanks a lot.

  1   2   3   >