Hi All,
How can I get the actual sql executed by a:
session.execute(sql,subs)
?
I tried turning on echo in the engine, but that just shows %s where the
substitutions should happen.
Is there any way to get the post-substitution sql?
(so that you can spot bugs where there have been typos in
Thanks for your quick answer,
On Feb 11, 1:32 am, Michael Bayer mike...@zzzcomputing.com wrote:
if SQLite supports a COLLATE syntax, then sure we can accept patches for 0.6
/trunk.
If you want instant gratification on sqlite just build yourself a
UserDefinedType for now (again 0.6/trunk).
Thanks, Mike!
Your example indeed works, but unfortunately when I add inheritance,
mapper fails to generate proper (inherited) class:
(I've changed code a little, so it represents more what I'm trying to
do)
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative
On Feb 11, 2010, at 6:33 AM, Christoph Burgmer wrote:
Thanks for your quick answer,
On Feb 11, 1:32 am, Michael Bayer mike...@zzzcomputing.com wrote:
if SQLite supports a COLLATE syntax, then sure we can accept patches for 0.6
/trunk.
If you want instant gratification on sqlite just
On Feb 11, 2010, at 6:45 AM, Andrija Zarić wrote:
Thanks, Mike!
Your example indeed works, but unfortunately when I add inheritance,
mapper fails to generate proper (inherited) class:
(I've changed code a little, so it represents more what I'm trying to
do)
class ValueItem(Item):
On 11 February 2010 14:26, Michael Bayer mike...@zzzcomputing.com wrote:
I'm assuming these are single-table inheritance mappers (I forgot about that
add the column trick..)
So yeah my solution was a quick hack and to continue in this way you'd have
to build non-primary mappers for each of
On Feb 11, 2:20 pm, Michael Bayer mike...@zzzcomputing.com wrote:
0.4.8 you'd subclass TypeEngine. I don't think theres too much surprising
going on there with types, plus sqlite accepts only unicode strings these
days anyway so that's sort of handled too.
Thanks, that looks promising.
Hi All,
Is this the right way to do this:
class Blog(Base):
__tablename__='blog_entry'
id = Column(Integer, primary_key=True)
date = Column('dated', Date, nullable=False)
title = Column(String(80))
entry = Column(Text())
owners_name =
On 2010-2-11 12:13, Chris Withers wrote:
Hi All,
How can I get the actual sql executed by a:
session.execute(sql,subs)
?
I tried turning on echo in the engine, but that just shows %s where the
substitutions should happen.
Is there any way to get the post-substitution sql?
SQLAlchemy does
Chris Withers wrote:
Hi All,
Is this the right way to do this:
class Blog(Base):
__tablename__='blog_entry'
id = Column(Integer, primary_key=True)
date = Column('dated', Date, nullable=False)
title = Column(String(80))
entry = Column(Text())
owners_name
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Wednesday, February 10, 2010 6:30 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Warnings take a really long time /
that SQL output is specific to 'table_name': 'CFA_CASH_FLOW_STATUS_TAB'
and 'table_name': 'CFA_CASH_FLOW_TAB'. that's two tables.
Jeff Peterson wrote:
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On
Behalf
Right, and there is that same code outputted for every table in the schema,
when reflecting that one view. What I posted was just the one snippet, it is
repeated over and over for each different table.
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
-Original Message-
From:
Hi,
sqlalchemy forks a process when it calls the db (in my case PostgreSQL,
but I don't think it matters) using, for example
from sqlalchemy.sql import text
s = text(...)
My question - is it possible to obtain the pid of this process at the
python level in some fashion? The reason for this
I thought you were reflecting a view ? a table will fan out to all of its
constraints, yes.
Jeff Peterson wrote:
Right, and there is that same code outputted for every table in the
schema, when reflecting that one view. What I posted was just the one
snippet, it is repeated over and over
Faheem Mitha wrote:
Hi,
sqlalchemy forks a process when it calls the db (in my case PostgreSQL,
but I don't think it matters) using, for example
from sqlalchemy.sql import text
s = text(...)
um, what ? there's no forking in SQLAlchemy.
My question - is it possible to obtain the
That is the troubling part, I am reflecting a view, and yet it is still
touching all those tables in the DB for schema='CRAR1APP'
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com]
On
Jeff Peterson wrote:
That is the troubling part, I am reflecting a view, and yet it is still
touching all those tables in the DB for schema='CRAR1APP'
does the name of your view appear at all in ALL_CONS_COLUMNS.TABLE_NAME ?
that's the only way reflection of a view could get the name of a
All,
I want to do a two-phase commit.
Published examples are more complex than what I need.
To put it another way, I don't want to use the ORM.
Here is what I want to do:
# This code does what I want - but is missing the two-phase
commit.
# All session code is commented out because I am
PaulE wrote:
All,
I want to do a two-phase commit.
Published examples are more complex than what I need.
To put it another way, I don't want to use the ORM.
Here is what I want to do:
A similar thread
The view name itself isn't but the names of all the tables that make up that
view are. So I guess that must be why.
--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com]
On Behalf Of Michael
Jeff Peterson wrote:
The view name itself isn't but the names of all the tables that make up
that view are. So I guess that must be why.
It is only looking at the columns declared in your view - the Table
reflection logic doesn't actually look at the original definition of the
view (there is a
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com]
On Behalf Of Michael Bayer
Sent: Thursday, February 11, 2010 1:26 PM
To: sqlalchemy@googlegroups.com
Subject: RE: [sqlalchemy] Warnings take a really long time /
NotImplementedError
Jeff
Hi,
First, many thanks to everyone who helped make SQLAlchemy such a great
module.
I'm currently using the declarative syntax and I would like to know
weither it's possible or not to automatically add a prefix on all
tables, without having to specify it on each and every table
separately.
That
F. Poirotte wrote:
Hi,
First, many thanks to everyone who helped make SQLAlchemy such a great
module.
I'm currently using the declarative syntax and I would like to know
weither it's possible or not to automatically add a prefix on all
tables, without having to specify it on each and every
I wrote a (long) blog post on this for Leopard. I haven't had the
chance to try it out on Snow Leopard.
http://blog.singletoned.net/2009/07/connecting-to-ms-sql-server-from-python-on-mac-os-x-leopard/
If anyone can tell me how to create virtual machines of Snow Leopard,
I'd be happy to try
I've been having a clumsy hack at enabling myself to pass a select
statement as a value to an insert statement. IE:
sa.insert(mytable).values(myothertable.select())
I've got it working in that most basic case, but I'm struggling when
the select statement has bindparams. The insert needs
27 matches
Mail list logo