Hi,
New with sqlalchemy, i'm trying to unittest my code:
import unittest
import os
from sqlalchemy.orm.exc import NoResultFound
import User
SQLITE_FILE = 'test.db'
class UserAddTestCase(unittest.TestCase):
def setUp(self):
... some code which create the session (removed to be
Hi all,
This is my first question regarding to SQLAlchemy, you can count me as a
newbie. Here is my problem:
I've this inheritance between my Python classes, everything were working
fine until last night when I've added another class to my inheritance
hierarchy. I've tried to find the cause of
Hi All,
DELETE FROM appname WHERE appname.appid = ?
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
Hi All,
DELETE FROM appname WHERE appname.appid = ?
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
Hi All,
When I run this
delete_stmt = appname.delete(appname.c.appid==1)
print delete_stmt
I get output
DELETE FROM appname WHERE appname.appid = ?
Is there any way I can print out raw sql statments with the parameters
included e.g.
DELETE FROM appname WHERE appname.appid = 1
Thanks!
On Jan 11, 2011, at 8:51 AM, Erkan Özgür Yılmaz wrote:
Hi all,
This is my first question regarding to SQLAlchemy, you can count me as a
newbie. Here is my problem:
I've this inheritance between my Python classes, everything were working fine
until last night when I've added another
On Jan 11, 2011, at 4:56 AM, pr64 wrote:
self.assertEqual(self.session.query(User).filter(User.firstname ==
user1_fn).count(), 1)
self.assertRaises(NoResultFound,
self.session.query(User).filter(User.firstname == other_fn).one())
assertRaises receives a callable, which when
On Jan 10, 2011, at 6:09 PM, Romy wrote:
Not sure what you mean, as I've seen hybrid setups before.
I'm pretty sure if you try to make a foreign key from an InnoDB table to a
MyISAM table, it will fail.
In any case, thanks for helping me narrow this down. I need to decide
whether I'll
Great, adding the primary_key=True to the linkTypes table solved my problem,
thank you very much...
Cheers...
E.Ozgur Yilmaz
Lead Technical Director
eoyilmaz.blogspot.com
www.ozgurfx.com
On Tue, Jan 11, 2011 at 5:24 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On Jan 11, 2011, at 8:51
This question comes up from time to time and I'm generally extremely
uncomfortable documenting it, as SQLAlchemy carefully protects its reputation
as being 100% bind-parameter driven and in no way wants to encourage the
rendering of data directly into SQL strings.This is the one real area
Thank you! I understand the security concerns. I only need this for
testing purposes and production will be all bind-parameter driven.
On Jan 11, 11:15 am, Michael Bayer mike...@zzzcomputing.com wrote:
This question comes up from time to time and I'm generally extremely
uncomfortable
I'm using SA with turbogears 2.x framework and in development mode when
I turn on all the logging I can see the generated SA queries in the
paste web server console. And one line after the generated query, there
is a line which shows the parameters.
here is a sample output:
Hi,
Is there any way that anyone knows of to force the column names
to be lowercase when reflecting the schema from the database for e.g.
appname = Table('appname', metadata, autoload=True)
Other posts suggested overriding the database schema with your own but
I would rather use SQLAlchemy's
Thanks Timuçin. I know of the logging functionality by setting
echo=True but I wanted to avoid the ? inside the query and have the
parameters instead without me having to do it manually so I could copy
the entire query string and execute it as is on the database. Michal's
wiki post solved that for
There's no straightforward way to do that. Schemes to copy each Table to a
new one with a lowercase .key attribute, using Inspector to generate the
Table object programatically (basically means, implement your own
Inspector.reflecttable()), subclassing Inspector (since it currently calls
15 matches
Mail list logo