Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-08 Thread Tarek Ziadé
this. Cheers Tarek -- Tarek Ziadé | http://ziade.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 to sqlalchemy+unsubscr...@googlegroups.com

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-07 Thread Tarek Ziadé
really know if there are other places where I should do something. On Fri, Nov 4, 2011 at 4:45 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 4, 2011, at 3:41 AM, Tarek Ziadé wrote: On Fri, Nov 4, 2011 at 10:33 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: ... Will try and come back

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-04 Thread Tarek Ziadé
+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-04 Thread Tarek Ziadé
On Fri, Nov 4, 2011 at 10:33 AM, Tarek Ziadé ziade.ta...@gmail.com wrote: ... Will try and come back ;) Hello, I am back \o/ Here's my v2: http://tarek.pastebin.mozilla.org/1373520 This time I have created a custom Strategy and Engine classes, and the get_engine() function takes care

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-04 Thread Tarek Ziadé
-- Tarek Ziadé | http://ziade.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 to sqlalchemy+unsubscr...@googlegroups.com. For more options

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-03 Thread Tarek Ziadé
://tarek.pastebin.mozilla.org/1372476 So, now I am pretty sure most of this code is crappy, and there's a better way to do this. I still need to make sure all of this is thread-safe. Thoughts ? Feedback ? Cheers Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-11-03 Thread Tarek Ziadé
On Thu, Nov 3, 2011 at 2:28 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: So, I have worked on a first prototype, and was unable to use the event system as-is, because of a lack of context to know which database the user is trying to access. So, after a bit of hacking, here's what I have

Re: [sqlalchemy] with_comment() ?

2011-07-12 Thread Tarek Ziadé
On Tue, Jul 12, 2011 at 4:46 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Jul 11, 2011, at 5:46 PM, Tarek Ziadé wrote: Hello We're using with_hint() to add comments to sql queries, but that'll be work only with selects. I guess I can do a compiler extension to be able to add

[sqlalchemy] with_comment() ?

2011-07-11 Thread Tarek Ziadé
to be able to add a comment to a select, insert or update statement ? Cheers Tarek -- Tarek Ziadé | http://ziade.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

[sqlalchemy] per-host pooling vs per-engine pooling

2011-06-24 Thread Tarek Ziadé
://server1/database2', pool=pool_server1) The goal is to reduce the number of sockets open for every host Is there a way to do it with the existing pools ? If not, I guess I'll work on a custom Pool, Thanks Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you

Re: [sqlalchemy] per-host pooling vs per-engine pooling

2011-06-24 Thread Tarek Ziadé
On Fri, Jun 24, 2011 at 7:04 PM, Michael Bayer mike...@zzzcomputing.com wrote: ... Is there a way to do it with the existing pools ?   If not, I guess I'll work on a custom Pool, well a pool is geared towards one specific connection which already has a database set up on it.    I guess maybe

Re: [sqlalchemy] Pypi release policy

2011-02-15 Thread Tarek Ziadé
it's called by easy_install SQLAlchemy or in the install_requires option in setuptools. Cheers Tarek -- Tarek Ziadé | http://ziade.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

Re: [sqlalchemy] Pypi release policy

2011-02-14 Thread Tarek Ziadé
://hg.mozilla.org/services/server-storage/file/78762deede5d/syncstorage/storage/sqlmappers.py#l55 Cheers Tarek -- Tarek Ziadé | http://ziade.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

Re: [sqlalchemy] Pypi release policy

2011-02-14 Thread Tarek Ziadé
. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- Tarek Ziadé | http://ziade.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

Re: [sqlalchemy] Pypi release policy

2011-02-14 Thread Tarek Ziadé
On Mon, Feb 14, 2011 at 11:44 AM, Wichert Akkerman wich...@wiggy.net wrote: .. you don't release at pypi a version that breaks the latest stable.  or if you do, you check the hidden attribute on that release, to avoid this problem with installers SQLAlchemy 0.7b1 is hidden. The hidden flag

Re: [sqlalchemy] Pypi release policy

2011-02-14 Thread Tarek Ziadé
On Mon, Feb 14, 2011 at 6:00 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 14, 2011, at 5:53 AM, Tarek Ziadé wrote: On Mon, Feb 14, 2011 at 11:44 AM, Wichert Akkerman wich...@wiggy.net wrote: .. you don't release at pypi a version that breaks the latest stable.  or if you do

[sqlalchemy] Adding order_by, offset and limit support to Delete

2010-12-22 Thread Tarek Ziadé
CustomCompiler(dialect, self, **kw) def delete(table, whereclause = None, **kwargs): return DeleteOrderBy(table, whereclause, **kwargs) -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] table inheritance

2010-12-07 Thread Tarek Ziadé
factory and the like, but everything fails. Whether because I was reusing the same column class objects or whether because I was conflicting with SQLALchemy meta-class magic. Is there any sane way to do this and avoid a crazy copy/paste ? Cheers Tarek -- Tarek Ziadé | http://ziade.org -- You

Re: [sqlalchemy] table inheritance

2010-12-07 Thread Tarek Ziadé
for this. Cheers Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr

[sqlalchemy] rollbacks on select

2010-08-23 Thread Tarek Ziadé
strategy SQLAlchemy implements ? If yes, is there a way to avoid those extra rollbacks ? Regards Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com

Re: [sqlalchemy] rollbacks on select

2010-08-23 Thread Tarek Ziadé
On Mon, Aug 23, 2010 at 5:48 PM, Michael Bayer mike...@zzzcomputing.com wrote: Sent from my iPhone On Aug 23, 2010, at 8:29 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: Hello, I use the default options to run queries via sql expressions and I've noticed that SQLAlchemy does a rollback

Re: [sqlalchemy] rollbacks on select

2010-08-23 Thread Tarek Ziadé
On Mon, Aug 23, 2010 at 5:53 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: On Mon, Aug 23, 2010 at 5:48 PM, Michael Bayer mike...@zzzcomputing.com wrote: Sent from my iPhone On Aug 23, 2010, at 8:29 PM, Tarek Ziadé ziade.ta...@gmail.com wrote: Hello, I use the default options to run

[sqlalchemy] binding values for the in() statement

2010-04-08 Thread Tarek Ziadé
']) This will fail because the dialect will not bind a list for the :emails params. Is there a way to do this ? I looked at the expression compiler but didn't find anything relevant. Or do I have to build the query manually with a ','.join() in this case ? Regards, Tarek -- Tarek Ziadé | http://ziade.org

[sqlalchemy] simplest pattern to query a database

2010-02-10 Thread Tarek Ziadé
, or if something simpler exists.. Regards Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email

[sqlalchemy] Configuring an existing session

2010-01-21 Thread Tarek Ziadé
Hi, I use a global session instance to work with my DB, so all module import it and use it. But at some point I sometimes need to reconfigure the engine to use another DB. I want to reconfigure the existing instance so other modules can still use the same session object to work with the DB. can