[sqlalchemy] Could not locate column in row for column

2014-02-12 Thread Igal Kreimer
Hello sqlalchemy team. im a new user to the alchemy, and doing the tutorial on ur site. ran ur tutorial on adding information to databases and querying against a virtual db (sqlite in memory) after i thought i got that, i tried testing against a real db - mysql db. im using the driver of

Re: [sqlalchemy] Session remove/close MySQL

2014-02-12 Thread Christian Démolis
Thx all NullPool solve my problem create_engine(cnx_str, poolclass=NullPool) 2014-02-07 19:11 GMT+01:00 Claudio Freire klaussfre...@gmail.com: On Fri, Feb 7, 2014 at 2:35 PM, Michael Bayer mike...@zzzcomputing.com wrote: The connection pool, if in use, will then not actually close the

Re: [sqlalchemy] override relationship in subclass

2014-02-12 Thread Michael Bayer
On Feb 11, 2014, at 9:38 PM, Eric Atkin eat...@certusllc.us wrote: Hi, I want to override a relationship in a subclass to relate to a subclass of the base attributes' related class. Perhaps an example of how I thought it should work: {{{ class Load(Base): __tablename__ = 'load'

Re: [sqlalchemy] Savepoints and expiry

2014-02-12 Thread Michael Bayer
On Feb 12, 2014, at 1:49 AM, Wolfgang Schnerring w...@gocept.com wrote: On 11 Feb 2014 06:54:22 Michael Bayer mike...@zzzcomputing.com wrote: On Feb 11, 2014, at 3:44 AM, Wolfgang Schnerring w...@gocept.com wrote: parent = session.query(Parent).first() self.assertEqual(1,

Re: [sqlalchemy] Could not locate column in row for column

2014-02-12 Thread Michael Bayer
On Feb 12, 2014, at 4:49 AM, Igal Kreimer igal.k...@gmail.com wrote: Hello sqlalchemy team. im a new user to the alchemy, and doing the tutorial on ur site. ran ur tutorial on adding information to databases and querying against a virtual db (sqlite in memory) after i thought i got

Re: [sqlalchemy] Could not locate column in row for column

2014-02-12 Thread Igal Kreimer
yes it does. exactly the same problem, copy pasted ur code and received: File C:\Python33\lib\site-packages\sqlalchemy-0.9.0-py3.3.egg\sqlalchemy\orm\query.py, line 2264, in all File C:\Python33\lib\site-packages\sqlalchemy-0.9.0-py3.3.egg\sqlalchemy\orm\loading.py, line 75, in instances

Re: [sqlalchemy] override relationship in subclass

2014-02-12 Thread Jonathan Vanasco
Couldn't it be handled with a mixin? {{{ class _LoadCore(Base): whatever you want for both classes here pass class Load(_LoadCore): __tablename__ = 'load' __mapper_args__ = { 'polymorphic_identity':'load', 'polymorphic_on':'polymorphic_type', } id =

Re: [sqlalchemy] override relationship in subclass

2014-02-12 Thread Eric Atkin
Yeah sorry I missed that. conversion is an attribute on Measured_Source. So the intent is that a Production_Load is a Load with its own additional attributes over Load as well as a constraint that its source is a Measured_Source which has its own attribute extensions over Source. One of the

Re: [sqlalchemy] override relationship in subclass

2014-02-12 Thread Eric Atkin
@gdelta.expression is a typo. Should be @delta.expression. On Wednesday, February 12, 2014 11:53:05 AM UTC-7, Eric Atkin wrote: Yeah sorry I missed that. conversion is an attribute on Measured_Source. So the intent is that a Production_Load is a Load with its own additional attributes over

Re: [sqlalchemy] Prepared Statements in Postgresql

2014-02-12 Thread Tony Locke
Hi, just to confirm, the executemany() method in pg8000 does use prepared statements. Cheers, Tony. On Friday, 15 January 2010 17:16:09 UTC, Michael Bayer wrote: mozillalives wrote: Hello Everyone, I am new to both sqlalchemy and elixir, but I have been using them for the past couple

Re: [sqlalchemy] Prepared Statements in Postgresql

2014-02-12 Thread Claudio Freire
On Wed, Feb 12, 2014 at 5:03 PM, Tony Locke tlo...@tlocke.org.uk wrote: I've noticed some opinions online indicating that psycopg2 does not have prepared statement support (e.g. - http://www.cerias.purdue.edu/site/blog/post/beware_sql_injections_due_to_missing_prepared_statement_support/)

Re: [sqlalchemy] override relationship in subclass

2014-02-12 Thread Michael Bayer
On Feb 12, 2014, at 1:53 PM, Eric Atkin eat...@certusllc.us wrote: Yeah sorry I missed that. conversion is an attribute on Measured_Source. So the intent is that a Production_Load is a Load with its own additional attributes over Load as well as a constraint that its source is a

Re: [sqlalchemy] Prepared Statements in Postgresql

2014-02-12 Thread Michael Bayer
On Feb 12, 2014, at 4:07 PM, Claudio Freire klaussfre...@gmail.com wrote: But, if you want an executemany that works in psycopg2 as it would in pg8000, you can PREPARE and then executemany the EXECUTE queries. I’ve worked a lot with pg8000 including that I’ve given them very broad

Re: [sqlalchemy] array types using OracleDialect

2014-02-12 Thread Amos Smith
Regarding the following: if the type of the LiteralBindParameter implements “literal_processor()”, that controls how the literal value is rendered into the statement. How does one implement the literal_processor() for a new type? Is literal_processor() method applicable for

Re: [sqlalchemy] array types using OracleDialect

2014-02-12 Thread Michael Bayer
On Feb 12, 2014, at 6:11 PM, Amos Smith asm...@aseg.com wrote: Regarding the following: if the type of the LiteralBindParameter implements “literal_processor()”, that controls how the literal value is rendered into the statement. How does one implement the literal_processor() for a new

Re: [sqlalchemy] array types using OracleDialect

2014-02-12 Thread Amos Smith
I migrated to 0.9.2 as I understood the literal_processor was new feature. I always get this error from listing shown below: def literal_processor(self, dialect): ^ IndentationError: unindent does not match any outer indentation level ArrayType is

[sqlalchemy] Twisted + SQLAlchemy

2014-02-12 Thread Pavel Aborilov
Hello! I'm working with SA from Twisted, and it's not so simple as I though. I red some old topic in this group and didn't find any good solution. I just want to know if there are any approach at present? -- You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: Savepoints and expiry

2014-02-12 Thread Wolfgang Schnerring
* Michael Bayer mike...@zzzcomputing.com [2014-02-12 09:19]: On Feb 12, 2014, at 1:49 AM, Wolfgang Schnerring w...@gocept.com wrote: I know that flush does not trigger expiry. ;) I was wondering whether savepoints qualified as being a stronger boundary than flush and thus might be worthy of