Re: [sqlalchemy] Selects, Outer Joins, and Auto-Correlation

2018-11-12 Thread andrew cooke
, Nov 12, 2018 at 7:56 AM andrew cooke wrote: > > > > > > > > > I have some code that uses high-level ORM and it works fine, except that > > > one particular section is too slow. So I was trying to replace that > > > section with a lower level query

[sqlalchemy] Selects, Outer Joins, and Auto-Correlation

2018-11-12 Thread andrew cooke
I have some code that uses high-level ORM and it works fine, except that one particular section is too slow. So I was trying to replace that section with a lower level query. But I can't work out how to persuade the Expression Language to stop auto-correlation. The query I am trying to

[sqlalchemy] Key error while creating link in graph

2013-02-07 Thread andrew cooke
Hi, Could someone please explain what the following error means? I assume I am expecting too much magic from SQLAlchemy, but I can't see why it doesn't just work. I am trying to define a directed graph of related (music) artists. So I have an Artist class (nodes) and a Link class (directed

[sqlalchemy] Re: Key error while creating link in graph

2013-02-07 Thread andrew cooke
Oh, staring at that some more - I guess the problem is that there is nothing that says that if alice links to bob then bob links from alice. I should just defined one arc. Sorry - I will fix my code. Andrew On Thursday, 7 February 2013 07:56:18 UTC-3, andrew cooke wrote: Hi, Could

[sqlalchemy] Re: Key error while creating link in graph

2013-02-07 Thread andrew cooke
I'm an idiot. Will delete post. I need to be more explicit about the intermediate table. On Thursday, 7 February 2013 07:56:18 UTC-3, andrew cooke wrote: Hi, Could someone please explain what the following error means? I assume I am expecting too much magic from SQLAlchemy, but I can't

[sqlalchemy] Polymorphic write - 'InstanceState' object has no attribute 'manager'

2010-05-07 Thread andrew cooke
Hi, This trace is from some code that is loading a lot of objects (and which usually does so with no problems). I don't have more details yet (it will be quite some work to find out exactly what data is causing the error), but it does use joined table inheritance. Does anyone have any idea

[sqlalchemy] Re: Polymorphic write - 'InstanceState' object has no attribute 'manager'

2010-05-07 Thread andrew cooke
As far as I know, I'm doing nothing that complex. I am creating a pile of mapped objects in Python and then dumping them to the database. The most likely cause is that a field is None, or of the incorrect type in some way, I would have guessed. Andrew On May 7, 9:56 am, Michael Bayer

[sqlalchemy] Creating Tables From Selects

2009-01-27 Thread andrew cooke
(I thought this might be a FAQ, but I can't find it, and searching isn't turning up anything either...). Am I right n thinking it is not possible to do CREATE TABLE AS in SQLAlchemy? In other words, creating a table from a select statement? I'm using 0.4 and Oracle. If it is possible I

[sqlalchemy] Constructors not called?

2008-08-29 Thread andrew cooke
Hi, Not sure if I'm misunderstanding what's happening, whether I have a bug, or whether this is normal behaviour, but as far as I can tell mapped objects that are returned from a query do not have their constructor called. Is that correct? In a bit more detail - I have a mapping defined to

[sqlalchemy] Composite Columns in Subclass with Joined Table Inheritance

2008-05-28 Thread andrew cooke
Hi, (Apologies for asking so many questions here - I really appreciate the help). I have been using joined table inheritance without any problems for a while with a very simple hierarchy: a base class/table called Measurement and various subclasses that contain a typed value column

[sqlalchemy] Re: Composite Columns in Subclass with Joined Table Inheritance

2008-05-28 Thread andrew cooke
I'm sorry - ignore that, I am talking crap. Adding with_polymorphic('*') *does* fix this - I was mislead because I had the same problem in several places, so when I fixed one section of the code another failed with a very similar stack trace. Cheers, Andrew

[sqlalchemy] Re: Possible quoting bug, SQLite? If not, what wrong (please)?

2008-05-22 Thread andrew cooke
1 - changing isnull to foo worked. thanks! 2 - i tried adding text('nulls last') in the order_by(...), but got an error from sqlite. i don't suppose there's something clever in sqlalchemy that does this in a portable way is there? 3 - what do you use as a reference for SQL? do you have the

[sqlalchemy] Re: Possible quoting bug, SQLite? If not, what wrong (please)?

2008-05-22 Thread andrew cooke
the case solution works too, which is what i'll go with. 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

[sqlalchemy] Re: in not implemented for queries?

2008-05-21 Thread andrew cooke
On May 21, 2:04 am, [EMAIL PROTECTED] wrote: what u want to accomplish? Well, it's the equivalent of the SQL IN. So i want to retrieve all Measurements which are associated with with a Time Series in the given list. The SQL equivalent would be something like: SELECT * from Measurement as M

[sqlalchemy] Re: in not implemented for queries?

2008-05-21 Thread andrew cooke
On May 21, 9:37 am, Michael Bayer [EMAIL PROTECTED] wrote: in_ is supported for column-based attributes. If you are getting NotImplemented, that's beacuse time_series is referencing either a collection or a many-to-one object reference. so SQL IN wouldn't work here.For the many-to-one

[sqlalchemy] in not implemented for queries?

2008-05-20 Thread andrew cooke
Hi, Just wanted to check: I am seeing a NotImplementedError (v 0.4.6 on Linux w Python 2.5) when I try to query some objects with the filter in. Does that mean that the feature is not implemented, or is it more likely an error in my code (eg somehow I'm calling a base class;