Hi all,
I have a query generated by sqlalchemy like this:
SELECT fattura_master.tipo_documento AS fattura_master_tipo_documento,
fattura_master.sezionale || '/' || CAST(fattura_master.anno AS
VARCHAR(None CHAR)) || '/' || CAST(fattura_master.numero AS VARCHAR(None
CHAR)) AS pk FROM
I saw this thread and had been thinking of something similar...
...a query.explain() that would run an explain of the query, log the
output somewhere and then return the query so you could do:
query.explain().all()
...and the like.
Is there a similar recipe for logging the query and its
On 21/11/2013 19:25, Michael Bayer wrote:
hoping you’ve already figured it out but otherwise I’m not entirely following
what the larger query you’re looking for would look like.I doubt you need
text() for anything.
Okay, pseudo code that doesn't work:
positions = something(
select
Hi,
How should one create SQLite temporary tables using SQLAlchemy? The following
does not work:
from sqlalchemy import create_engine, Column, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from
On Nov 22, 2013, at 6:24 AM, Gombas, Gabor gabor.gom...@morganstanley.com
wrote:
Hi,
How should one create SQLite temporary tables using SQLAlchemy? The following
does not work:
from sqlalchemy import create_engine, Column, String
from sqlalchemy.ext.declarative import
yes that is here:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/Explain
comments:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionModifiedSQL
feel free to combine
On Nov 22, 2013, at 5:12 AM, Chris Withers ch...@simplistix.co.uk wrote:
I saw this thread and had been thinking
On Nov 22, 2013, at 4:50 AM, Jose Soares jose.soa...@sferacarta.com wrote:
Hi all,
I have a query generated by sqlalchemy like this:
SELECT fattura_master.tipo_documento AS fattura_master_tipo_documento,
fattura_master.sezionale || '/' || CAST(fattura_master.anno AS VARCHAR(None
CHAR))
On Nov 22, 2013, at 5:06 AM, Chris Withers ch...@simplistix.co.uk wrote:
On 21/11/2013 19:25, Michael Bayer wrote:
hoping you’ve already figured it out but otherwise I’m not entirely
following what the larger query you’re looking for would look like.I
doubt you need text() for
On 22/11/2013 15:23, Michael Bayer wrote:
(this latter query will likely have more stuff in it, not sure I used
.select_from(...).join(...) correctly either ;-)
Hope that illustrates what I'm after…
take your original cte and use it just like that, just call
positions.c.instrument_id for
Ok. It works,
thanks, Michael
j
On 11/22/2013 04:22 PM, Michael Bayer wrote:
On Nov 22, 2013, at 4:50 AM, Jose Soares jose.soa...@sferacarta.com wrote:
Hi all,
I have a query generated by sqlalchemy like this:
SELECT fattura_master.tipo_documento AS fattura_master_tipo_documento,
On Nov 22, 2013, at 10:31 AM, Chris Withers ch...@simplistix.co.uk wrote:
On 22/11/2013 15:23, Michael Bayer wrote:
(this latter query will likely have more stuff in it, not sure I used
.select_from(...).join(...) correctly either ;-)
Hope that illustrates what I'm after…
take your
Hello there, fellow developers!
We've recently run into a terrible problem.
A small tool uses SQLAlchemy to execute statements read from a text file
against a database.
The trouble comes when that pre-defined statement has a colon symbol in the
field value of a, say, INSERT statement.
Like
On Nov 22, 2013, at 1:11 PM, Ivan Kalinin pupss...@gmail.com wrote:
Hello there, fellow developers!
We've recently run into a terrible problem.
A small tool uses SQLAlchemy to execute statements read from a text file
against a database.
The trouble comes when that pre-defined
That works, thanks. Currently, I'm using __declare_last__() to modify
__table__.schema (SQLite) or __table__._prefixes (Oracle, PostgreSQL), once the
dialect is known. For the latter two I'm also monkey-patching
post_create_table(), which seemed easier to do than to completely re-implement
OK you can also use @compiles on top of CreateTable to get directly at that
process.
On Nov 22, 2013, at 4:34 PM, Gombas, Gabor gabor.gom...@morganstanley.com
wrote:
That works, thanks. Currently, I'm using __declare_last__() to modify
__table__.schema (SQLite) or __table__._prefixes
15 matches
Mail list logo