I think I got a fix you can use in. looks like this, just adding "scalar=True" as a hint that the columns should not be broken out of the select(), and "correlate=False" to indivate the Z table shouldnt be correlated to the enclosing query's Z table (you could also use aliases to get around it):zi
Ah, never thought of the str() trickthanks!
This is a bit of an oddball case, and easy to work around, certainly not worth blocking for.
SA is progressing and stabilizing nicely. I'm happy with the pace of things and quality of the code. After slinging Javscript all day, it's a joy to make
you know I am looking thru the docs as well as the unit tests and I am surprised that I dont seem to have ever even completed this functionality, i.e. being able to stick a SELECT inside the column clause of another select. which is very strange since I was pretty sure I hit all these in at least
No, they're supposed to be subqueries -- correlated subqueries. That maybe got lost in simplifying and pasting the code.
Note that the problem isn't the inclusion of the subqueries in the column clause -- that's correct.
It's the repetition of those subqueries in the FROM clause that's the issue
youre sticking two select() objects in your column clause, inside the functionsso they come out as SELECT statements in your column clause, i.e. subqueries.what SQL are you looking to produce ? maybe this ?q = db.sql.select([L.c.id, L.c.nm, Z.c.zipcode, db.sql.func.latlondist(Z.c.latitude, Z.
SA seems intent on adding subqueries used in DB functions to the FROM list of a query:
Z = S.Table('zipcodes', dbeng,
S.Column('zipcode', S.VARCHAR(5), nullable=False,
primary_key=True),
S.Column('city', S.VARCHAR(30), nu
6 matches
Mail list logo