[sqlalchemy] MySQL deadlocks and retry

2009-04-27 Thread Jonathan LaCour
to catch this exception and then retry the transaction? Thanks in advance! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] Re: MySQL deadlocks and retry

2009-04-27 Thread Jonathan LaCour
as pretty as I'd like, but it works :) -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Creating a custom type

2009-01-01 Thread Jonathan LaCour
Extension API reference: http://tinyurl.com/8wfkgl Applying Mapper Extensions: http://tinyurl.com/7a3b5c Good luck. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: sharding database elixir metadata.drop_all and metadata.create_all problem

2008-06-19 Thread Jonathan LaCour
tables. I've linked to (and quoted from) the relevant documentation over on the elixir list, where the original poster initially raised the question. Sorry for the noise. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message

[sqlalchemy] Re: reading from one database and writing to another

2008-06-09 Thread Jonathan LaCour
this :) -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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 group, send email

[sqlalchemy] Re: Getting All Columns From A Join

2008-05-08 Thread Jonathan LaCour
`. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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 group, send email

[sqlalchemy] Re: Merging Objects Issue

2008-04-09 Thread Jonathan LaCour
further questions, don't hesitate to ask over on the Elixir mailing list. I'll do my best to answer followups over there! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: Merging Objects Issue

2008-04-09 Thread Jonathan LaCour
who are using file/memcached-based caching strategies. You bet. If this is indeed the problem, then we need to file a ticket and fix it. I was arguing against monkeypatching the Entity class with the custom __getstate__ and __setstate__, but didn't make that clear. -- Jonathan LaCour http

[sqlalchemy] Re: Merging Objects Issue

2008-04-09 Thread Jonathan LaCour
Jonathan LaCour wrote: Michael Bayer wrote: I think if Elixir doesn't support mapped entities being pickled, or requires end-user __getstate__/__setstate__ (i think the latter is the more reasonable requirement), it should be explicit about this. pickling/unpickling is a basic necessity

[sqlalchemy] deferral pattern idea

2008-03-31 Thread Jonathan LaCour
: query.options(defer(column)) Does this seem desirable to anyone else, or am I just crazy :) -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: deferral pattern idea

2008-03-31 Thread Jonathan LaCour
be extended somehow to be a bit more like `defer` but they are in a way inherently different. Thanks, let me know what you decide. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: version_id_col question

2008-02-14 Thread Jonathan LaCour
that goes... -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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 group, send

[sqlalchemy] Re: a way to share Session.mapper(SomeObject) across two scoped sessions?

2008-01-30 Thread Jonathan LaCour
like. FYI, I think this should go in the advanced tutorial I referred to this morning on the Elixir list... -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: doubly-linked list

2008-01-11 Thread Jonathan LaCour
Jonathan LaCour wrote: I am attempting to model a doubly-linked list, as follows: ... seems to do the trick. I had tried using backref's earlier, but it was failing because I was specifying a remote_side keyword argument to the backref(), which was making it blow up with cycle detection

[sqlalchemy] doubly-linked list

2008-01-11 Thread Jonathan LaCour
? -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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 group, send email

[sqlalchemy] Re: doubly-linked list

2008-01-11 Thread Jonathan LaCour
Jonathan LaCour wrote: I am attempting to model a doubly-linked list, as follows: Replying to myself: task_table = Table('task', metadata, Column('id', Integer, primary_key=True), Column('name', Unicode), Column('next_task_id', Integer, ForeignKey('task.id')), Column

[sqlalchemy] Re: doubly-linked list

2008-01-11 Thread Jonathan LaCour
to maintain the previous anyway, since it can be implied from the next a heck of a lot easier. The simplest solution is usually the best, and this one definitely wasn't very simple! On to other ideas... -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] quick question...

2008-01-08 Thread Jonathan LaCour
. Should I just go ahead an use text() rather than bother with attempting to construct this using an SQLAlchemy expression? (Yes, I know that this is gross...) -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: quick question...

2008-01-08 Thread Jonathan LaCour
UNION SELECT ? AS value), ?, ?, ?, ?, ?, ?, ?, ?) 2008-01-08 17:41:21,833 INFO sqlalchemy.engine.base.Engine.0x..50 [100, '100.0', 'Item One', None, None, None, None, 1, None, None] -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: before_update mapper extension behavior?

2007-09-28 Thread Jonathan LaCour
curious if this is possible... -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: before_update mapper extension behavior?

2007-09-28 Thread Jonathan LaCour
:) Excellent :) Yes, Ben and I talked about it, and I am really glad to see that there is a nice way to deal with this now! Thanks! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: multiple mapper extensions

2007-08-01 Thread Jonathan LaCour
: EXT_CONTINUE = EXT_PASS = object() EXT_STOP = object() EXT_STOP is just a feel-good value. the general rule of halt on any return value but EXT_CONTINUE is unchanged. Perfect. This now makes total sense, thanks for doing this! -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] Re: multiple mapper extensions

2007-07-30 Thread Jonathan LaCour
of the API couldn't be smoothed out a bit :) -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: multiple mapper extensions

2007-07-30 Thread Jonathan LaCour
the next activity...otherwise someone's upgrade might silently fail. Fair enough, I suppose. I think I can get over it, for the most part. It might just be an issue of cognitive dissonance because of the naming convention or how its described in the documentation. -- Jonathan LaCour http

[sqlalchemy] MySQL specific error in subselect

2007-06-15 Thread Jonathan LaCour
finally: metadata.drop_all() #-# It appears to me that MySQL doesn't like it when you don't specify a FROM in the subselect, whereas PostgreSQL and SQLite don't care. -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] Re: MySQL specific error in subselect

2007-06-15 Thread Jonathan LaCour
Jonathan LaCour wrote: It appears to me that MySQL doesn't like it when you don't specify a FROM in the subselect, whereas PostgreSQL and SQLite don't care. Responding to myself, I have solved the problem. As it turns out, you can force SQLAlchemy to generate a FROM for the subselect

[sqlalchemy] Re: polymorphic inheritance -- stumped!

2007-04-20 Thread Jonathan LaCour
Murphy's law strikes again. As soon as I sent the email, I finally noticed that I wasn't passing my table into my outputs_mapper after staring at it for an hour... Sorry for the spam! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received

[sqlalchemy] handing SELECT ... FOR UPDATE

2007-04-09 Thread Jonathan LaCour
way to approach using `SELECT ... FOR UPDATE`? We were thinking about the possibility of creating a MapperExtension to make this happen, but aren't really sure about how to go about implementing that, and any direction would be useful. Thanks! -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] Re: DynamicMetaData question

2007-03-21 Thread Jonathan LaCour
of MetaData. I see your point. I don't care what you do with DynamicMetaData, as long as I can do this one day: metadata = MetaData() engine = create_engine(...) metadata.connect(engine) ... preferably soon ;) -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] Re: DynamicMetaData question

2007-03-13 Thread Jonathan LaCour
the threadlocal insanity :) What do you think? -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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

[sqlalchemy] DynamicMetaData question

2007-03-12 Thread Jonathan LaCour
to your metadata. The fact that its threadlocal is easy to miss, and I don't see why it has any threadlocal behavior at all. Am I missing something? Wouldn't it be better to two separate MetaData types, one for dynamically binding your engine, and another for threadlocal metadata? -- Jonathan LaCour

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Jonathan LaCour
will probably give a reasonable idea of how Elixir is different from both ActiveMapper and TurboEntity. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Jonathan LaCour
techniques are bugs that should be fixed! With ActiveMapper, the approach that I took had some issues and overcoming them required more time than I had to give. With Elixir, having a team of people committed to helping out makes all the difference in the world. -- Jonathan LaCour http

[sqlalchemy] Re: Announcing Elixir!

2007-02-13 Thread Jonathan LaCour
to be posting a quick tutorial on creating your *own* DSL statements for your model objects. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group

[sqlalchemy] Announcing Elixir!

2007-02-12 Thread Jonathan LaCour
Today, we are pleased to announce the release of Elixir (http://elixir.ematia.de), a declarative mapper for SQLAlchemy. Elixir is the successor to ActiveMapper and TurboEntity, and is a collaboration between Daniel Haus, Jonathan LaCour and Gaƫtan de Menten. Elixir's website provides

[sqlalchemy] Re: ActiveMapper supports overriding of autoloaded columns?

2006-11-04 Thread Jonathan LaCour
to handle. Listen to Mike, and move over to full-fledged SQLAlchemy. -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] Re: Activemapper and selection

2006-11-01 Thread Jonathan LaCour
folder :) Either way, my advice still applies. It would be great if you could illustrate with your example the current SQL that is being generated, along with some improved SQL that would be faster. -- Jonathan LaCour http://cleverdevil.org

[sqlalchemy] Re: TurboEntity announcement

2006-10-30 Thread Jonathan LaCour
! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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 group, send email

[sqlalchemy] Re: ObjectAlchemy - ODMG compatible layer for SQLAlchemy

2006-10-17 Thread Jonathan LaCour
design patterns. Best of luck! -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: ObjectAlchemy - ODMG compatible layer for SQLAlchemy

2006-10-17 Thread Jonathan LaCour
, because I really don't think that they make any sense at all. Good luck - -- Jonathan LaCour http://cleverdevil.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email