[sqlalchemy] alternate ways to removing event listeners?

2016-09-26 Thread Iain Duncan
*) or altering the event registry itself? (this is just for tests, ok if it's not stable API) thanks! iain -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, sen

Re: [sqlalchemy] Joining, if join not already done?

2016-09-09 Thread Iain Duncan
ok thanks. +1 for adding that in the long term! iain On Fri, Sep 9, 2016 at 2:17 PM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > > On 09/09/2016 05:13 PM, Iain Duncan wrote: > >> Hi all, I have a query that gets conditionally extending depending on >> wha

[sqlalchemy] Joining, if join not already done?

2016-09-09 Thread Iain Duncan
I'm stepping out of the public api: if UserOrgRoleAssoc not in [ent.class_ for ent in query._join_entities]: query.join(UserOrgRoleAssoc) Is there a better (proper?) way to do this? thanks! Iain -- You received this message because you are subscribed to the Google Groups "sqlalchemy&q

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
Thanks Mike! engine.dispose() fixed it. Makes sense that it was a garbage collection problem. For any others finding this, I just added a call to engine.dispose() to class level tearDown and it's all good. On Thu, Sep 8, 2016 at 10:39 AM, Iain Duncan <iainduncanli...@gmail.com> wrote:

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
I've discovered too that the issue only happens when all my test suites get called from one call to discovery. I've I run then in 8 calls (one to each package, with each holding 1 to 5 test suites of about 1 to 10 tests each), there's no issue. :-/ iain On Thu, Sep 8, 2016 at 10:36 AM, Iain

Re: [sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
newb. Should I be adding dispose in class level teardown? thanks! Iain On Thu, Sep 8, 2016 at 10:26 AM, Mike Bayer <mike...@zzzcomputing.com> wrote: > Engine per test is v inefficient, are you at least calling dispose() on > each one in teardown? > > > On Thursday, Se

Re: [sqlalchemy] Re: postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-08 Thread Iain Duncan
Hi Jonathan, sure can, here it is below. I think maybe this has something to do with the fact that we are creating a new engine and dropping the schema on each pass maybe? Because it seems to *only* happen when we run about 75 tests in a row. Thanks for looking! class

[sqlalchemy] postgres/pyscopg failing to connect after a certain number of tests, stuck!

2016-09-07 Thread Iain Duncan
pool_size to 20 and max_overflow to -1 but that doesn't seem to make a difference. Any clues would be lovely! thanks iain traceback: src/warp.test/warp/test/functional.py:70: in setUp self.init_db() src/warp.test/warp/test/functional.py:51: in init_db cls.engine.execute("drop

[sqlalchemy] experience with marshmallow-sqlachemy?

2016-06-07 Thread Iain Duncan
Hey y'all, just want to know if anyone has used and would like to share experiences/opinions re marshmallow and marshmallow-sqalchemy. thanks! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving

[sqlalchemy] Re: strategies/tools for conversion from json dicts to SQLAlchemy objects in large apps?

2016-06-07 Thread Iain Duncan
I should add that I'm not married to Colander either, if people have had good experiences with Marshmallow-Sqlalchemy, I could very well switch to that. thanks! On Tue, Jun 7, 2016 at 9:17 AM, Iain Duncan <iainduncanli...@gmail.com> wrote: > Hi folks, I'm working on an internal framew

[sqlalchemy] strategies/tools for conversion from json dicts to SQLAlchemy objects in large apps?

2016-06-07 Thread Iain Duncan
, and somewhere (?) we convert. Any suggestions on what people have found to be good strategies or tools (or reading!) for localizing and controlling the conversion from dicts to mapped objects with relationships would be much appreciated. Or suggestions that I'm just wrong and why. thanks, Iain

[sqlalchemy] natural vs surrogate keys for user groups?

2015-07-23 Thread Iain Duncan
feedback from anyone on this or similar issues. thanks! (And it's nice to be getting back to SQAlchemy from Angular land, woot!) Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from

[sqlalchemy] best books on DB design for sqlalchemy users?

2015-07-23 Thread Iain Duncan
I feel like I should really take up my db game for an upcoming set of projects, and am wondering if there are any real standout books on db design that fit well with the design philosophy of SQLA. Recos much appreciated! thanks Iain -- You received this message because you are subscribed

[sqlalchemy] Mysql issue with big composite primary keys

2014-11-09 Thread Iain Duncan
and just declaring a unique constraint on the two columns and got the same message. thanks Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr

Re: [sqlalchemy] queue pooling, mysql sleeping, for very occasional use apps?

2014-09-21 Thread Iain Duncan
Ok thanks all, I'm pretty sure a low timeout is all I'll need, but was curious about Null pool. Thanks for the info. iain On Sat, Sep 20, 2014 at 7:52 AM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 20, 2014, at 10:50 AM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 19

[sqlalchemy] queue pooling, mysql sleeping, for very occasional use apps?

2014-09-19 Thread Iain Duncan
) or is there a smarter way to do it. It's a process to send out a bunch of sms messages via twilio, so it totally doesn't matter if takes a bit to wake up. Is disabling pooling with NullPool the right way to go? thanks! Iain -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] Re: queue pooling, mysql sleeping, for very occasional use apps?

2014-09-19 Thread Iain Duncan
Thanks guys! Iain On Fri, Sep 19, 2014 at 12:41 PM, Jonathan Vanasco jvana...@gmail.com wrote: Just to add to jeff's response, I had a similar situation with Postgres under a twisted app a while back. Someone else on the twisted list was using Mysql + Twisted + Sqlalchemy and pointed

Re: [sqlalchemy] Re: queue pooling, mysql sleeping, for very occasional use apps?

2014-09-19 Thread Iain Duncan
So can anyone tell me what exactly happens with NullPool, I'm not clear from the docs. Does that mean a fresh connection will be made on a new hit, and we'll never get the gone away, but at the expense of slower connections? Is is terribly slower? thanks! Iain On Fri, Sep 19, 2014 at 2:27 PM

[sqlalchemy] Re: using SQLAlchemy on mobile devices?

2014-04-28 Thread Iain Duncan
For future browsers, apparently it can be done with Kivy, but I haven't tried it. Kivy looks very promising as a way to use Python on iOs and Android though! iain On Sun, Apr 27, 2014 at 10:30 AM, Iain Duncan iainduncanli...@gmail.comwrote: Sorry if this is a stupid question, but does anyone

[sqlalchemy] using SQLAlchemy on mobile devices?

2014-04-27 Thread Iain Duncan
locally on iphone and android without data connection to a server - looks half decent - can use sqlalchemy for persistence thanks! Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from

[sqlalchemy] Sorting on joined columns with a mapper?

2014-02-08 Thread Iain Duncan
\nWHERE %s = membership.orgunit_id ORDER BY membership.date_end, client.name_last' (21L,) Any tips much appreciated! thanks Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send

Re: [sqlalchemy] table inheritance: how to change a record from base type to derived type?

2013-12-11 Thread Iain Duncan
On Tue, Dec 10, 2013 at 3:54 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Dec 10, 2013, at 5:04 PM, Iain Duncan iainduncanli...@gmail.com wrote: Hi, I'm stuck on how to do something that I'm sure must be possible. I have two kinds of records, using table inheritance, Client

[sqlalchemy] table inheritance: how to change a record from base type to derived type?

2013-12-10 Thread Iain Duncan
table's id col. Thanks! Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy

Re: [sqlalchemy] Re: most established SQLA fixture tools?

2013-10-17 Thread Iain Duncan
done. I suppose it might be a trivial job to populate the db from json with just SA code in a helper class, maybe a dependency for doing this is over kill?? thanks Iain On Wed, Oct 16, 2013 at 3:30 PM, Jonathan Vanasco jonat...@findmeon.comwrote: I saw this a while back: https

[sqlalchemy] locking tables with orm? need to generate PK manually...

2013-10-16 Thread Iain Duncan
, **other_values) ) session.commit() # unlock table session.UNLOCKER thanks Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com

Re: [sqlalchemy] locking tables with orm? need to generate PK manually...

2013-10-16 Thread Iain Duncan
Thanks Micheal, that's what I hoped! iain On Wed, Oct 16, 2013 at 12:13 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 16, 2013, at 1:38 PM, Iain Duncan iainduncanli...@gmail.com wrote: Hi folks, I'm working on a legacy database that has some issues with PK generation. The long

[sqlalchemy] most established SQLA fixture tools?

2013-10-16 Thread Iain Duncan
something that works similarly to the fixtures in the django test framework that would be ideal.. Thanks! Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email

[sqlalchemy] sqlalchmey 0.8 stuck on a join with reflected tables

2013-10-12 Thread Iain Duncan
).join(GroupAgent ( it goes on and on) I *thought* I'd specified the join conditions well enough in the above, but clearly I'm missing something, any help much appreciated! thanks! Iain traceback: File /home/qualbe/src/PaymentProxy/paymentproxy/helpers.py, line 30, in get_appurl

Re: [sqlalchemy] Session creation without scoped session?

2013-10-11 Thread Iain Duncan
Thanks Michael, that's very helpful. Iain On Fri, Oct 11, 2013 at 7:18 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 10, 2013, at 8:57 PM, Iain Duncan iainduncanli...@gmail.com wrote: Seems like there are some variety of opinion on some stuff on the pyramid list so I thought

Re: [sqlalchemy] Re: using SQLA in distributed, concurrent, or asynchronous contexts?

2013-10-05 Thread Iain Duncan
that would be great. At the moment I'm just trying to figure out what I want to figure out. ;-) thanks Iain On Thu, Oct 3, 2013 at 5:05 PM, Jonathan Vanasco jonat...@findmeon.comwrote: Also, a decent strategy to use is this: a) Your client does a lot of business logic in Pyramid. When you

[sqlalchemy] using SQLA in distributed, concurrent, or asynchronous contexts?

2013-10-03 Thread Iain Duncan
any pointers on what to read up on, use, etc. Right now all my experience is on Pylons/Pyramid and has not had to use any fancy messaging, deferred processing, or concurreny handling so I think I have a lot reading ahead of me. Thanks! Iain -- You received this message because you are subscribed

Re: [sqlalchemy] finding sqlalchemy jobs?

2013-09-27 Thread Iain Duncan
Thanks Michael, much appreciated! Iain On Fri, Sep 27, 2013 at 7:43 AM, Michael Bayer mike...@zzzcomputing.comwrote: I'll keep my ears open.Where I work we've taken on remote contractors in the past but at the moment it's pretty tight. On Sep 25, 2013, at 6:49 PM, Iain Duncan

[sqlalchemy] finding sqlalchemy jobs?

2013-09-25 Thread Iain Duncan
, but if anyone else has suggestions on how to find job posts for specific Python technologies, I'd love to hear them. Thanks! Iain idun...@xornot.com www.xornot.com -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop

[sqlalchemy] wake of RoR sql injection vulnerability

2013-01-09 Thread Iain Duncan
of salt, but I wonder whether the monolithic, almost closed-garden nature of the RoR ecosystem contributed to the situation compared to the situation in Python. Of course that could just be a big confirmation bias on my part. Would welcome thoughts from those more experienced than me. Iain

Re: [sqlalchemy] wake of RoR sql injection vulnerability

2013-01-09 Thread Iain Duncan
mechanism. iain On Wed, Jan 9, 2013 at 9:27 AM, Michael Bayer mike...@zzzcomputing.comwrote: I've just read http://www.insinuator.net/2013/01/rails-yaml/ and really, the huge fail here is that Rails allows the construction of arbitrary application objects based on parameters. So while SQL

Re: [sqlalchemy] query joining and filtering with table inheritance

2012-09-28 Thread Iain Duncan
contact to each of the related tables. You guys rock, thanks! Iain On Sep 28, 2012, at 7:05 AM, lenart...@volny.cz wrote: Hello. I am not at my development environment now so I cannot test it, but I think you want this: http://docs.sqlalchemy.org/en/rel_0_7/orm/inheritance.html

[sqlalchemy] query joining and filtering with table inheritance

2012-09-27 Thread Iain Duncan
that: - have name_last or name_first match, if the Contact is a Person - have name match, if the contact is an Organization Thanks Iain -- 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] Saas deployment suggestions for SQLAlchemy?

2012-05-01 Thread Iain Duncan
most people deploying something as a SaaS set it up so there is one python worker serving all the users or is it better to have a python process/worker per user? War stories welcome! thanks Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] help decrypting exception re session management error?

2011-12-19 Thread Iain Duncan
, but does the above info give anyone any idea what kind of thing I might be doing wrong and how to track down something like this? thanks Iain -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Meetup group in Vancouver BC

2011-12-08 Thread Iain Duncan
://www.meetup.com/Vancouver-Pyramid-Pylons thanks Iain xornot studios www.xornot.com -- 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] sqla on app engine?

2011-10-08 Thread Iain Duncan
Hey folks, just saw the announcement that google appengine now has an sql backend: http://code.google.com/apis/sql/ I don't know near enough about app engine to understand whether this means we could use SQLAlchemy on it now, would love to hear from those who do! thanks Iain -- You received

Re: [sqlalchemy] sqla on app engine?

2011-10-08 Thread Iain Duncan
Awesome, thanks for the update MIke. Iain On Sat, Oct 8, 2011 at 1:52 PM, Michael Bayer mike...@zzzcomputing.comwrote: we have a ticket from a ways back referring to the task of getting this to work on GAE: http://www.sqlalchemy.org/trac/ticket/1958 I was having some communication

Re: [sqlalchemy] Re: replacing or altering a mapper?

2011-04-23 Thread Iain Duncan
as the single central train station for plugging as much of the architectural bits into each other as possible. There is a bit a of a learning curve, but much like SQAlchemy, the thornier the issues and the bigger the apps, the more I wind up liking it. =) Iain -- You received this message because

[sqlalchemy] replacing or altering a mapper?

2011-04-22 Thread Iain Duncan
'].mapped_table = join(user_table, user_extra_table) but that seemed to just result in loss of the original user table. Anyone have suggestions on how I can change the mapping of the User class *without* having to touch the module that makes the base user mapper? thanks! Iain -- You received

[sqlalchemy] Re: replacing or altering a mapper?

2011-04-22 Thread Iain Duncan
that there is no way to do so, or am I missing something? thanks Iain -- 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

Re: [sqlalchemy] Re: replacing or altering a mapper?

2011-04-22 Thread Iain Duncan
called twice. Long winded, but might be useful to someone googling some day! Thanks for your explanation, it no doubt saved me from trying some kind of surgical mapper deletion that would bite me in the ass later. =) iain -- You received this message because you are subscribed to the Google

[sqlalchemy] Re: how to make a transaction fail for testing?

2009-12-14 Thread iain duncan
thanks Alex. I guess for integration tests one could also monkey patch it to override the commit method? thanks iain On Dec 13, 2:47 pm, Alex Brasetvik a...@brasetvik.com wrote: On Dec 13, 2009, at 22:25 , iain duncan wrote: Hey folks, I'm wondering how I can make a transaction fail

[sqlalchemy] how to make a transaction fail for testing?

2009-12-13 Thread iain duncan
Hey folks, I'm wondering how I can make a transaction fail deliberately for testing how my transaction handling code is working. Is there some simple mechanism for making sure a section in a try block with session.commit() raises an exception without altering the code? thanks Iain -- You

[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-03 Thread Iain Duncan
On Sun, 2009-05-03 at 09:43 -0400, Michael Bayer wrote: On May 2, 2009, at 8:16 PM, Iain Duncan wrote: On Sat, 2009-05-02 at 09:41 -0400, Michael Bayer wrote: you'd set cascade=all, delete-orphan on the Purchase.registration side (in this case its your backref). Thanks Mike

[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-02 Thread Iain Duncan
the mapper? Iain On May 2, 2009, at 1:42 AM, Iain Duncan wrote: Hi all, I have a mapper that looks like this: mapper( Registration, registration_table, properties={ 'purchase': relation(Purchase, backref=backref('registration', uselist=False), cascade='all

[sqlalchemy] auto-creating one-to-one relations with the orm?

2009-05-01 Thread Iain Duncan
like: r = Registration( purchase=Purchase() ) Or should it work magically if I set up my cascade options differently? Thanks Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Clearing out a scoped session

2009-03-29 Thread Iain Duncan
. There is attributes.InstanceKey, but if use that to create an object, the object created doesn't have an attribute named 'key' either. I'd still like to try out the instance clearing method if you any suggestions for 0.4.8 Thanks Iain --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: Clearing out a scoped session

2009-03-28 Thread iain duncan
I'm hoping there is some way of copying these objects form their prototype declaration class into a new session and flush to the newly created tables on each pass. Any tips much appreciated again, Iain --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: Clearing out a scoped session

2009-03-28 Thread iain duncan
. The cumbersome jiggery pokery will all be hidden in a test utility method so I'm fine with ugliness in there in order to make writing the test fixtures as quick as possible. Or Thanks for all the help Iain --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: Clearing out a scoped session

2009-03-28 Thread iain duncan
was obviously a misunderstanding on my part! Thanks Iain --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Clearing out a scoped session

2009-03-28 Thread iain duncan
On Mar 28, 2:21 pm, Michael Bayer mike...@zzzcomputing.com wrote: iain duncan wrote: Thanks Mike. I figured this is probably not the intended use. The thing is, I'm trying to make a declarative template for test seed data and declaring it all in a class like so makes for the easiest

[sqlalchemy] Clearing out a scoped session

2009-03-27 Thread iain duncan
object - resave and reflush those same objects again and again Much appreciated, Iain --~--~-~--~~~---~--~~ 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] Poolclass argument to create_engine

2008-11-24 Thread Iain
which is just not a good place to go :) I have made a simple, temporary change to my 0.5rc4 version of sqlalchemy/engine/strategies.py that you're welcome to work from but I'm not saying it is particularly safe, elegant or otherwise :) Thanks Iain --- strategies.py.old 2008-11-24 13:08

[sqlalchemy] Re: Poolclass argument to create_engine

2008-11-24 Thread Iain
?   since yes I think if a   framework is going to take over the job of calling create_engine()   then they should provide proper inputs.  There's a lot of things which   can be passed to create_engine() which don't work as strings. On Nov 24, 2008, at 7:01 PM, Iain wrote: I was wondering

[sqlalchemy] Customize query filters

2008-11-17 Thread Iain
to always re-write the queries that way whenever a user tests for equivalence on the relevant columns. Hope that makes sense! Thanks Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Customize query filters

2008-11-17 Thread Iain
, comparator_factory=MyComparator) }) On Nov 18, 1:41 am, Michael Bayer [EMAIL PROTECTED] wrote: On Nov 17, 2008, at 7:50 AM, Iain wrote: I was wondering if anyone is aware of a way that I can customize the way query filters are written - possibly by some sort of customization of table columns

[sqlalchemy] Re: problems with py2app

2008-04-26 Thread iain duncan
On Sat, 2008-26-04 at 05:04 -0700, Koen Bok wrote: Hey Iain, If you build apps with py2app it tries to figure out which modules to include automatically. If these modules are nested in some weird way it sometimes chokes. A solution is to import that module by hand in your main script (your

[sqlalchemy] problems with py2app

2008-04-25 Thread iain duncan
Hi folks, I seem to be having a problem with sqlalchemy and py2app, but I am very new to OS X and py2app, so I could be doing something stupid. When we try to build the app we get this: ImportError: No module named logging Traceback (most recent call last): File /Users/bear/iain/booking-wx

[sqlalchemy] Re: Ensuring a clean database for each test case

2008-04-18 Thread iain duncan
starting data in. def setup(self): os.sys(mysql -ufoo -pbar -Ddb_name test_db_1.sql) etc etc Works ok and is actually pretty quick. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: mappers for having problems with associations and flushing

2008-04-14 Thread iain duncan
here are my mappers in case that helps, maybe I don't understand the cascading properly? # relations for the bookings mapper( Booking, booking_table, properties={ 'client': relation( Client ), 'institution': relation( Institution, ), 'category': relation( Category ),

[sqlalchemy] Re: Extension proposal

2008-04-14 Thread iain duncan
with extras or something? just a thought! Iain --~--~-~--~~~---~--~~ 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: Stuck on flush vs commit problems

2008-04-13 Thread iain duncan
On Sun, 2008-13-04 at 11:28 -0400, Michael Bayer wrote: On Apr 12, 2008, at 5:39 PM, iain duncan wrote: File /home/xornot/www/booking/booking-wx/model.py, line 227, in update_resource_obj session.flush(resource_obj) File /usr/lib/python2.4/site-packages/SQLAlchemy-0.4.3-py2.4

[sqlalchemy] Stuck on flush vs commit problems

2008-04-12 Thread iain duncan
764, in flush self.uow.flush(self, objects) File /usr/lib/python2.4/site-packages/SQLAlchemy-0.4.3-py2.4.egg/sqlalchemy/orm/unitofwork.py, line 189, in flush objset = util.Set([o._state for o in objects]) TypeError: iteration over non-sequence Any input welcome! Thanks, Iain

[sqlalchemy] Re: Stuck on flush vs commit problems

2008-04-12 Thread iain duncan
on. Thanks! Iain --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED

[sqlalchemy] Re: A General Thank You

2008-02-11 Thread iain duncan
On Sat, 2008-19-01 at 17:48 -0500, Michael Bayer wrote: youre very welcome ! glad you've had a positive experience. Yeah, the SA docs are awesome. The whole package is awesome. I was recently really impressed with how easy it was to migrate to 0.4. Iain

[sqlalchemy] Re: 0.4 deprecation warnings, what is the new get_by/select_by?

2007-12-20 Thread iain duncan
On Thu, 2007-20-12 at 09:58 +0100, Gaetan de Menten wrote: On Dec 20, 2007 8:50 AM, iain duncan [EMAIL PROTECTED] wrote: Sorry if this seems a stupid question, but I thought that Mike had said that in sa0.4, if you used session_context that this User.query.get_by(name='john

[sqlalchemy] 0.4 deprecation warnings, what is the new get_by/select_by?

2007-12-19 Thread iain duncan
of the (almost as) convenient: User.query.get_by( **kwargs ) User.query.select_by( **kwargs ) User.query.select() Thanks iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send

[sqlalchemy] Doc bug? 0.3 tutorial not working

2007-11-17 Thread iain duncan
://web:[EMAIL PROTECTED]/db_name') metadata = MetaData() metadata.bind(db) TypeError: 'NoneType' object is not callable However this still works: metadata = MetaData(db) The tutorial still says the two are equivalent, so I guess something's fishy? Thanks Iain

[sqlalchemy] Re: Doc bug? 0.3 tutorial not working

2007-11-17 Thread iain duncan
guess something's fishy? the correct syntax is metadata.bind = db.Im not seeing metadata.bind(db) anywhere ? Well that's what I get for trying to stay up as late as my studying girlfriend. My sincere apologies! :/ Sheepish Iain

[sqlalchemy] Re: stuck on self referrencing mapper thingy WORKING, thanks

2007-11-10 Thread iain duncan
OK this is what happens here, the relationship you want to establish is: product_table (product_table.id=collections.parent_id)--- collections (collections.child_id=product_table.id) product_table so above, youve got product_table.id, youve got the collections table

[sqlalchemy] stuck on self referrencing mapper thingy

2007-11-09 Thread iain duncan
relationship between them. Please specify the 'onclause' of this join explicitly. I'm in over my head here, so if anyone has the time to comment on the above that would be luverly. Thanks Iain --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] rlike with assign_mapper?

2007-11-01 Thread iain duncan
be re matches. Any tips most appreciated! Thanks Iain --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: vote for Python - PLEASE!

2007-10-21 Thread iain duncan
! First thing I do know for any misc db utility is figure out whether I can just use SA and the autoload feature to do it in python! =) iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: RLIKE, REGEXP

2007-10-21 Thread iain duncan
(table.c.col1.op('rlike')('re')) table.c.col1.op('regexp')('re') Is it possible to use them with the ORM too? Or am I misunderstanding the above? If someone has the time to post an example of how one would do an rlike version of Resource.select_by( foo=bar ) I'd love to see it. Thanks Iain

[sqlalchemy] Re: RLIKE, REGEXP

2007-10-21 Thread iain duncan
the Table instance for now, might not have added op() to the class-based properties Excuse what may be a stupid question, but is this for both 0.3 and 0.4 or just the new stuff? ( I know, I gotta upgrade soon now! ) Thanks Iain --~--~-~--~~~---~--~~ You received

[sqlalchemy] deletion behavior question

2007-02-12 Thread iain duncan
with this? Should I add a destructor to the classes that wipes out the many to many entry with a sql delete clause? Thanks Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group

[sqlalchemy] offlist thanks Re: [sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread iain duncan
the point of using interpreted language _and_ open-source otherwise? yes I'm sure you're right. But the SA sources right now look a ways over my head! Anyway, thanks so much for the tips. Iain --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: offlist thanks Re: [sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread iain duncan
Darn, apologies to all. Clearly I am too sleepy to be doing this as I can't even work my mail client. :/ Thanks On Wed, 2007-07-02 at 01:58 -0800, iain duncan wrote: On Wed, 2007-07-02 at 11:53 +0200, svilen wrote: If you have the time and know how, do you know what the efficient way

[sqlalchemy] Re: Using assoc proxy with a regular field, help?

2007-02-06 Thread iain duncan
On Tue, 2007-06-02 at 06:25 -0200, Roger Demetrescu wrote: Hi iain On 2/5/07, iain duncan [EMAIL PROTECTED] wrote: Below is my code in case someone has time to look at it. At the moment it works to get article.ordering as a list instead of one field. Is there a way to tell

[sqlalchemy] Using assoc proxy with a regular field, help?

2007-02-05 Thread iain duncan
time to look at it. At the moment it works to get article.ordering as a list instead of one field. Is there a way to tell it that this is only supposed to be one item? Thanks Iain page_table = Table('pages', metadata, Column('page_id', Integer, primary_key = True), Column('page_name

[sqlalchemy] Re: sqlalchemy lost connection?

2007-02-04 Thread iain duncan
On Sun, 2007-04-02 at 10:33 -0200, Jorge Godoy wrote: iain duncan [EMAIL PROTECTED] writes: ridiculous but at least it works. I suppose in the case of a web app the cron job could even be on any old server using wget. I'd put the cron job on the same server as the app... :-) The load

[sqlalchemy] Re: sqlalchemy lost connection?

2007-02-04 Thread iain duncan
realize it would cut out the problem. Iain --~--~-~--~~~---~--~~ 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] doc bug for Association Object example code

2007-02-04 Thread iain duncan
Line 3 should be: if k.keyword.keyword_name == 'jacks_stories': ( Tested it out ). Thanks iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-03 Thread iain duncan
message: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table 'article_36c9' Thanks, Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: sqlalchemy lost connection?

2007-02-03 Thread iain duncan
on your server to make a pointless hit on the db server in question once an hour or whatever. Seems ridiculous but at least it works. I suppose in the case of a web app the cron job could even be on any old server using wget. Iain --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-03 Thread iain duncan
On Sat, 2007-03-02 at 18:44 -0500, Karl Guertin wrote: On 2/3/07, iain duncan [EMAIL PROTECTED] wrote: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table 'article_36c9' I'd think that you're