[sqlalchemy] association_proxy

2020-03-13 Thread Damian Yurzola
Folks: I'm trying to achieve the following. I have a legacy table (Parent), which has a good foreign key to a tiny table that complements it (Child). For the use case, querying Parent without joining with Child is not meaningful. class Child(Base): __tablename__ = "child" id =

Re: [sqlalchemy] Concrete inheritance with different hybrid methods

2020-01-08 Thread Damian Yurzola
e, you need to select from TableA and TableB explicitly and write > the UNION directly. > > if this in fact a "toy" example then I would say you're better off not > using concrete inheritance as it is not very fluent. > > > > > On Tue, Jan 7, 2020, at 1:38 PM,

[sqlalchemy] Concrete inheritance with different hybrid methods

2020-01-07 Thread Damian Yurzola
rticularities of a table to stay with the table definition and not at the union level. Thoughts? Ideas? Thanks!!! --Damian -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Veri

Re: [sqlalchemy] sqlalchemy generated query returns fewer objects than rows

2016-06-16 Thread Damian Dimmich
. Thank you, Damian On Tuesday, June 7, 2016 at 6:34:02 PM UTC+4, Mike Bayer wrote: > > > > On 06/07/2016 03:34 AM, Damian Dimmich wrote: > > Hi, > > > > We've been staring at a problem for some time, where an sqlalchemy > > generated query we run returns le

[sqlalchemy] sqlalchemy generated query returns fewer objects than rows

2016-06-07 Thread Damian Dimmich
he query that is generated is correct, and the database returns the correct set of results, however some of these seem to get 'lost' when sqlalchemy assembles the result set. Any ideas? Damian -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To

[sqlalchemy] Re: Postgresql 9.4 JSONB support

2014-06-26 Thread Damian Dimmich
On Tuesday, June 24, 2014 6:21:40 PM UTC+4, Jonathan Vanasco wrote: On Tuesday, June 24, 2014 3:32:41 AM UTC-4, Damian Dimmich wrote: I intend to develop further syntax/query support for this type on an as needed basis for now - suggestions and comments are much appreciated. 1. Nice

[sqlalchemy] Postgresql 9.4 JSONB support

2014-06-24 Thread Damian Dimmich
are much appreciated. Thank you, Damian -- 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

[sqlalchemy] dynamically adjusting the sql query that the model/class is defined by

2013-01-21 Thread Damian Dimmich
the __table__ select statement be cached/reused from one request to the next? How would I generate select based classes 'on the fly'/on a per request basis (and would this be very slow if I did)? Thank you very much in advance for any suggestions. Damian -- You received this message because

Re: [sqlalchemy] dynamically adjusting the sql query that the model/class is defined by

2013-01-21 Thread Damian
. Thank you again for your support, Damian On Monday, 21 January 2013 16:07:15 UTC, Michael Bayer wrote: On Jan 21, 2013, at 8:41 AM, Damian Dimmich wrote: Hi I have an application that was originally written to support just one organisation. This app is now being modified

[sqlalchemy] before_flush event doesn't seem to permit additional update to dirty objects

2012-06-06 Thread Damian Dimmich
pyramid) and last_updated columns in the event handler, the sql only issues updates for the other columns that where modified. Any ideas as to what am I missing? Thanks in advance, Damian def attach_user_committing(Session, flush_context, instances): This function gets called

[sqlalchemy] Re: before_flush event doesn't seem to permit additional update to dirty objects

2012-06-06 Thread Damian
() Thank you for helping me spot this, Damian On Jun 6, 4:06 pm, Michael Bayer mike...@zzzcomputing.com wrote: The code looks fine to me, other than the access of Session._new for which you should be really calling upon the public new collection. What you might want to make sure

[sqlalchemy] azure sqlalchemy

2012-05-21 Thread Damian Dimmich
Hi, Has anyone used sqlalchemy and azure at any point? I may need to work with azure shortly... Thanks! Damian -- 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: History meta and unique issue

2011-10-18 Thread Damian
Hi Mike, Brilliant thanks - that works - spent ages staring at it and missed the second col.copy()! Damian On Oct 17, 6:27 pm, Michael Bayer mike...@zzzcomputing.com wrote: ah the example has a bug, you're hitting a second part of the code there where it fetches columns that are placed

[sqlalchemy] History meta and unique issue

2011-10-17 Thread Damian
) #and so forth class CheckMeter(Meter): __mapper_args__ = {'polymorphic_identity': 'check_meter'} #etc Details: Sqlalchemy 7.3 Sqlite db backend Python2.5 Best regards, Damian -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] before_flush events - how can i find out which objects have been updated?

2011-08-03 Thread Damian Dimmich
been updated. Any suggestions/comments on the below would be greatly appreciated! Thanks, Damian def attach_user_committing(Session, flush_context, instances): user_id = authenticated_userid(pyramid.threadlocal.get_current_request()) #for each object being committed/flushed, set the flushing

[sqlalchemy] queuepool timeout's with mod_wsgi under heavier load

2010-01-14 Thread Damian
of problem? I've cross posted this to both the mod_wsgi and sqlalchemy mailing lists - hope that's ok as I believe this may be relevant to both groups. Thanks, Damian -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] stored procedures and bind params on mssql

2009-11-20 Thread Damian
, x='abc') which results in: TypeError: get_bind() got an unexpected keyword argument 'x' Am I doing anything particularly wrong? If I just manually type in 'abc' instead of :x the query returns successfully. This is using pymssql. Thanks, Damian -- You received this message because you

[sqlalchemy] postgres and/or generic enum support in sqlalchemy

2009-05-27 Thread Damian
Hi, http://www.sqlalchemy.org/trac/ticket/1109 Is this still being worked on? In particular it would be interesting to get this running for postgres for us. If not, I would like to have a go at it in the near future, or am happy to help test if someone else is working on this. Cheers, Damian

[sqlalchemy] Re: postgres and/or generic enum support in sqlalchemy

2009-05-27 Thread Dimmich Damian
of the most awesome libraries i've ever worked with :). Damian On Wed, May 27, 2009 at 4:49 PM, Michael Bayer mike...@zzzcomputing.comwrote: from my perspective my comments on the ticket still stand - the MySQL specificness has to be removed and the interface regarding encoding and such should

[sqlalchemy] Re: postgres and/or generic enum support in sqlalchemy

2009-05-27 Thread Dimmich Damian
that is in the ticket above? I have no idea how hard it would be to modify 0.5 to support an enum type in a databases colspecs.. It would seem that the approach in the ticket would be able to expose the same interface in 0.5/0.6 even if the internals changed. Cheers, Damian On Wed, May 27, 2009 at 5:22 PM