Hi,
>From what I can tell sqla (version 0.4) doesn't support this? I know I
can access 'statement' from a Query object, but I'm using a select
object. I'm trying to do this because I'm trying to create a view
table like this
eng.execute("CREATE VIEW foobar AS %s" % someselect.compile(eng))
My se
On Jan 18, 2010, at 6:27 PM, Ross Vandegrift wrote:
>
> Shouldn't this work on SA 0.5.8?
>
> engine = create_engine('sqlite:///:memory:', echo=True)
> metadata.create_all(engine)
> binds = { device_table : engine,
> switch_table : engine }
>
Currently its looking at the mapped table
On 18 jan, 19:30, Michael Bayer wrote:
> ...
> > How was that fixed in trunk, the atribute was renamed to _query or
> > something like that?
>
> it was actually always there as _query for internal use. the "query" was
> coming from the usage of Session.mapper, which it no longer uses.
>
Mike
Hello,
I've run into a case where my code works with a single engine binding
but breaks if bound to multiple engines. I'm doing some things that
might be considered weird - mixing joined and single table inheritance
to reduce data storage, inheriting mappers from other derived mappers.
The except
On Jan 18, 2010, at 3:35 PM, PauloS wrote:
> On Jan 16, 4:06 pm, Michael Bayer wrote:
>> OK SQLSoup is using the Session.extension which adds a ".query" attribute
>> unconditionally. this bug is fixed in trunk. I can't do it in 0.5 since
>> .query is a public API that people might be relyi
On Jan 16, 4:06 pm, Michael Bayer wrote:
> OK SQLSoup is using the Session.extension which adds a ".query" attribute
> unconditionally. this bug is fixed in trunk. I can't do it in 0.5 since
> .query is a public API that people might be relying upon. To work around in
> 0.5 do:
>
> sqlsou
On Jan 18, 2010, at 10:00 AM, Tomas Zulberti wrote:
> Hi. I have the following error while making a query using the models:
>raise exc.DBAPIError.instance(statement, parameters, e,
> connection_invalidated=is_disconnect)
> ProgrammingError: (ProgrammingError) can't adapt
> 'UPDATE data_items
Hi. I have the following error while making a query using the models:
raise exc.DBAPIError.instance(statement, parameters, e,
connection_invalidated=is_disconnect)
ProgrammingError: (ProgrammingError) can't adapt
'UPDATE data_items SET content=%(content)s WHERE data_items.serial_id
= %(data_ite
Thank you.
On Jan 18, 9:41 am, Michael Bayer wrote:
> On Jan 18, 2010, at 7:33 AM, Kent wrote:
>
> > Given an InstrumentedAttribute object, how can you determine which
> > data type (int, str, datetime, etc) that the attribute expects to
> > house?
>
> > Thanks in advance if anyone can answer thi
Here's my reworking of the example for time types:
"""
from datetime import datetime, timedelta, date
from sqlalchemy import MetaData, Table, Column, DateTime, Date,
Interval
from sqlalchemy.orm import mapper, create_session
metadata = MetaData('postgresql:///avdd')
interval_table1 = Table('peri
On Jan 18, 2010, at 7:33 AM, Kent wrote:
> Given an InstrumentedAttribute object, how can you determine which
> data type (int, str, datetime, etc) that the attribute expects to
> house?
>
> Thanks in advance if anyone can answer this.
for a column-based attribute you can get at the column and
Given an InstrumentedAttribute object, how can you determine which
data type (int, str, datetime, etc) that the attribute expects to
house?
Thanks in advance if anyone can answer this.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to thi
> > However, I have issues with the difference in NULL value semantics
> > between Python and SQL. Ie. if a calculated column is defined via a
> > column_property as price*amount, then the result will be NULL if any
> > of the values is NULL. However, in Python, None*something throws a
> > TypeErro
This can be done and it's not too complicated, but beware as in 95% of
the time it's a deficency in your model; ie. you can refactor your
model so that you don't need this.
If it's the other 5% of cases, here's what the code looks like (I
can't honestly remember if I read this in the docs or got i
14 matches
Mail list logo