Thanks Michael,
just for following readers I precise the ORDER BY clause causing the
OperationalError is the one coming *before* the EXCEPT so I had to
add .order_by(None) to the first query, now it looks like:
Session.query(model.Sensor) \
.order_by(None) \
.except_(
[Michael Bayer, 2011-01-09]
The 0.6 series is not surprisingly our most successful series ever,
with SQLA 0.6.5 racking up 36,000 downloads from Pypi in a period of
76 days, approximately 15K per month, plus about 2K a month from
Sourceforge.
+ at least 4241 installations via .deb files (note
Dear all,
I've decided to plug SQLAlchemy to my web framework in order to let
SQLAlchemy handle the framework's user sessions.
Theses sessions require a lot of SELECT and UPDATE all the time.
Therefore, I'd like to toggle expire_on_commit and (possibly) autocommit *for
the SESSIONS table only.*
Hi,
New with SQLalchemy, here is my problem:
My model is:
user_group_association_table = Table('user_group_association',
Base.metadata,
Column('user_id', Integer, ForeignKey('user.id')),
Column('group_id', Integer, ForeignKey('group.id'))
)
department_group_association_table =
assuming this is also your ticket #2023 ?
http://www.sqlalchemy.org/trac/ticket/2023
On Jan 12, 2011, at 11:40 AM, Jon Nelson wrote:
I'm unable to build the C extensions for SQLAlchemy 0.6.6 on CentOS 5.5:
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
On Thu, Jan 13, 2011 at 9:12 AM, Michael Bayer mike...@zzzcomputing.com wrote:
assuming this is also your ticket #2023 ?
http://www.sqlalchemy.org/trac/ticket/2023
That is not my ticket, but surely appears to be related!
--
Jon
--
You received this message because you are subscribed to
I'd certainly never do that - no matter what type of application is running,
its always best to use transaction-per-logical operation, which means usually,
transactions are short. If the transactions are necessarily long, a database
failure in the middle means the operation just fails, but
You'd implement the expire yourself using SessionExtension.after_commit().
On Jan 13, 2011, at 9:18 AM, Franck wrote:
Dear all,
I've decided to plug SQLAlchemy to my web framework in order to let
SQLAlchemy handle the framework's user sessions.
Theses sessions require a lot of SELECT
On Wednesday, January 12, 2011, Michael Bayer mike...@zzzcomputing.com wrote:
The name of the property from the mapper perspective is name. That's the
contract of declarative:
class MyClass(some_declarative_base):
__tablename__ = 'j'
x = Column(Integer, key='z')
y =
I am finding myself doing a fair amount of copy-and-paste in the data
model I'm currently working on, and I'd like to reduce that if
possible. For example, I have several different types of objects that
have names belonging to namespaces. So every such table gets
boilerplate looking like this
On Jan 13, 2011, at 12:11 PM, Randall Nortman wrote:
I am finding myself doing a fair amount of copy-and-paste in the data
model I'm currently working on, and I'd like to reduce that if
possible. For example, I have several different types of objects that
have names belonging to namespaces.
Hello,
I have created an SQLAlchemy type which represents a postgresql aclitem (which
represents postgresql access control lists). I am able to load and save
newly-created ACLItems from the database, however, modifying the values of an
instance of the type does not dirty it for flushing. Is
Hi,
I am getting an error trying to insert records into a PostgreSQL
database with SQLAlchemy. My table definition:
class dream4_eta_15km_pm10(Base):
__tablename__='pm10_dream_rasters'
gid=Column(Integer,Sequence('pm10_dream_rasters_gid_seq'),primary_key=True)
There's mistakes in how this is structured. UserDefinedType represents a type
object applied to a Column. The actual data handled by such a type is not
meant to be an instance of the type itself. ACLItem() here would be its own
class, and UserDefinedType would be the superclass of a class
On Jan 13, 1:00 pm, Michael Bayer mike...@zzzcomputing.com wrote:
[...]
Mixins are extensively documented at
http://www.sqlalchemy.org/docs/orm/extensions/declarative.html#mixin-classes
So they are! I really should read the What's New in 0.x document
before switching to 0.x. What a nice
The gid is fine here, its the presence of GeoAlchemy objects sent as bind
parameters where they're not able to be rendered as function calls inline with
the SQL. You should check with the GeoAlchemy list
(http://groups.google.com/group/geoalchemy) with a full example of your insert
statement,
On Thursday, January 13, 2011, wilbur bhudsp...@edac.unm.edu wrote:
Hi,
I am getting an error trying to insert records into a PostgreSQL
database with SQLAlchemy. My table definition:
class dream4_eta_15km_pm10(Base):
__tablename__='pm10_dream_rasters'
Thanks!
On Jan 13, 1:32 pm, Michael Bayer mike...@zzzcomputing.com wrote:
The gid is fine here, its the presence of GeoAlchemy objects sent as bind
parameters where they're not able to be rendered as function calls inline
with the SQL. You should check with the GeoAlchemy list
Thanks for responding,
I tried changing the geometry object definition, as well as the model
definition and I get the same result...
dream_geom=MULTIPOLYGON((-120.000 43.833,-96.833 43.833,-96.833
26.000,-120.000 26.000,-120.000 43.833))
class dream4_eta_15km_pm10(Base):
To Michael Bayer: sqlalchemy simplifies my life every day and makes me
vastly more productive! Many thanks.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this
On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote:
Suppose a concurrent thread or process deleted your row in a new
transaction and committed it, or didn't even commit yet hence locked the
row, in between the time you said commit() and later attempted to access the
On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote:
see expire_on_commit=False as well as Session.commit() for further detail:
http://www.sqlalchemy.org/docs/orm/session.html#committing
http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session.commit
To
On Jan 13, 2011, at 10:18 PM, Russ wrote:
On Wednesday, January 12, 2011 2:16:00 PM UTC-5, Michael Bayer wrote:
see expire_on_commit=False as well as Session.commit() for further detail:
http://www.sqlalchemy.org/docs/orm/session.html#committing
On Thursday, January 13, 2011 10:29:10 PM UTC-5, Michael Bayer wrote:
So you're looking to do a write-through cache here, i.e. write the DB, then
write the value straight to the cache. I think if you were to say
session.flush(), which emits the SQL, then detach all the objects using
Thanks for your advise.
My application is a tornadoweb app. So I'm going to create Session()
for each request.
On Jan 13, 11:23 pm, Michael Bayer mike...@zzzcomputing.com wrote:
I'd certainly never do that - no matter what type of application is running,
its always best to use
25 matches
Mail list logo