Hi,
I have a weird problem.
(Mysql)
When I do a create_all(), i get the error :
File
/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py,
line 931, in _handle_dbapi_exception
raise exc.DBAPIError.instance(statement, parameters, e,
I recently tried out 0.6 beta 3, and I noticed that the following
construct is no longer allowed using the sql expression language:
def update_foos(connection, foo_items):
update = foo_table.update(
foo_table.c.id == bindparam('id'),
values = { 'column_1' :
Hi all,
I've been trying to get the grandchildren relationship working in
the code below, but have just about run out of permutations to try. I
couldn't get much out of the docs, and the archives turned up a few
similar queries but none with an answer. Is this even possible? Is
there a better
nekto0n wrote:
Wow. That was fast =)
Thanks for the fix. I'm a bit confused with results on 0.6beta3. Timer
showed significant speed boost and profiler (and breakpoint in
_CursorFairy) didn't show attempts to get rowcount. Am I doing
something wrong?
0.6 is faster overall but I checked the
Martijn Moeling wrote:
Hi,
I have a weird problem.
(Mysql)
When I do a create_all(), i get the error :
File
/Library/Python/2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/engine/base.py,
line 931, in _handle_dbapi_exception
raise exc.DBAPIError.instance(statement,
Jeff Peck wrote:
I recently tried out 0.6 beta 3, and I noticed that the following
construct is no longer allowed using the sql expression language:
def update_foos(connection, foo_items):
update = foo_table.update(
foo_table.c.id == bindparam('id'),
values = {
Anders Langworthy wrote:
Hi all,
I've been trying to get the grandchildren relationship working in
the code below, but have just about run out of permutations to try. I
couldn't get much out of the docs, and the archives turned up a few
similar queries but none with an answer. Is this even
Michael Bayer wrote:
I will add further detail to the error message.
the new message is:
CompileError: bindparam() name 'x' is reserved for automatic usage in the
VALUES or SET clause of this insert/update statement. Please use a name
other than column name when using bindparam() with
Michael - Thank you so much for the explanation. Rereading this error
message now makes perfect sense and this is a really good change.
Also - thanks for the explanation about implicit vs explicit
bindparams. I am embarrassed to admit that I actually did not know
this, and I use the expression
Ah, sorry I think I solved my own problem. I was doing something silly
where I was creating Student instances before mapping class. Following
advice, I put the code creating Student instances after calling
mapper(Student, students_table) and it worked out.
Many thanks for trying to replicate the
Hi there,
I'm just trying to sort out some code implementation utilising
SQLAlchemy that should store some output for a Monte-Carlo simulation
I'm running.
The simulation works thus:
I have a dictionary of students, with their preferred projects and a
Monte-Carlo simulation that takes said
Hi,
I'm trying to use the secondary argument to create a relation that
joins two tables through an intermediary. SQLAlchemy says that it
can't figure out the correlation automatically. There are other
relations and mappings going on here on these tables, but the base of
this is as follows.
patrick wrote:
Hi,
I'm trying to use the secondary argument to create a relation that
joins two tables through an intermediary. SQLAlchemy says that it
can't figure out the correlation automatically. There are other
relations and mappings going on here on these tables, but the base of
On Mon, Apr 12, 2010 at 11:04 AM, Michael Bayer
mike...@zzzcomputing.com wrote:
Anders Langworthy wrote:
Hi all,
I've been trying to get the grandchildren relationship working in
the code below, but have just about run out of permutations to try. I
couldn't get much out of the docs, and the
Apparently, new versions of SQLite will enforce Foreign Keys ( unlike
previous versions ), but, for the sake of backwards-compatibility, you
have to explicitly turn on foreign key enforcement by issuing: pragma
foreign_keys=on;.
http://www.sqlite.org/foreignkeys.html
I am new to SQLAlchemy --
On Apr 12, 2010, at 1:00 AM, nekto0n wrote:
Wow. That was fast =)
Thanks for the fix. I'm a bit confused with results on 0.6beta3. Timer
showed significant speed boost and profiler (and breakpoint in
_CursorFairy) didn't show attempts to get rowcount. Am I doing
something wrong?
OK,
On Apr 12, 2010, at 7:22 PM, NickPerkins wrote:
Apparently, new versions of SQLite will enforce Foreign Keys ( unlike
previous versions ), but, for the sake of backwards-compatibility, you
have to explicitly turn on foreign key enforcement by issuing: pragma
foreign_keys=on;.
Thanks, I tried it...but could not get the desired result ( enforced
FKs using SQLite ).
Here is my test code:
#!/usr/bin/env python
import sqlalchemy
from sqlalchemy.interfaces import PoolListener
class MyListener(PoolListener):
def connect(self, dbapi_con, con_record):
18 matches
Mail list logo