[sqlalchemy] Re: add_entity(y) and join(y)

2008-10-07 Thread az
On Tuesday 07 October 2008 00:01:58 Michael Bayer wrote: On Oct 6, 4:22 pm, [EMAIL PROTECTED] wrote: hi i have a query where q = ...q.initial q = q.join( some_link_name ) ...q.otherstuff q = q.add_entity( target_klas_of_the_above_link) ... this used to work ok, but recently it

[sqlalchemy] Re: how to dynamically creating and_ clause

2008-10-07 Thread az
On Tuesday 07 October 2008 12:20:49 robert rottermann wrote: hi there, I would like to add entries to an and_ clause dinamycally like: and_clause = and_() if x: add sommething to and_clause if y: add sommething to and_clause .. 1. clist = [] if x: add sommething to clist if y:

[sqlalchemy] Re: how to dynamically creating and_ clause

2008-10-07 Thread Julien Cigar
.append() On Tue, 2008-10-07 at 11:20 +0200, robert rottermann wrote: hi there, I would like to add entries to an and_ clause dinamycally like: and_clause = and_() if x: add sommething to and_clause if y: add sommething to and_clause .. how would I do that thanks robert

[sqlalchemy] limit the set of returned columns

2008-10-07 Thread Martijn Moeling
Hi, Yesterday I was searching this group and the SA 5.0 doc to get something working. Somewere I came across an option to specify the columnames to return (and getting a tuple or so) Let me explain: Keep the following in mind: I have a table which stores files defined with

[sqlalchemy] Re: add_entity(y) and join(y)

2008-10-07 Thread az
yes, all is about sa 0.5. But 0.5 has been doing that since day one and 0.4 does it too, though 0.4 might not do it in the same set of cases. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Re: limit the set of returned columns

2008-10-07 Thread Empty
Hi, Yesterday I was searching this group and the SA 5.0 doc to get something working. Somewere I came across an option to specify the columnames to return You can specify the column names as part of the query, like session.query(User.name, User.phone). Filename, permissions and

[sqlalchemy] how to dynamically creating and_ clause

2008-10-07 Thread robert rottermann
hi there, I would like to add entries to an and_ clause dinamycally like: and_clause = and_() if x: add sommething to and_clause if y: add sommething to and_clause .. how would I do that thanks robert --~--~-~--~~~---~--~~ You received this message because

[sqlalchemy] Re: limit the set of returned columns

2008-10-07 Thread Martijn Moeling
Thanx! In Mysql it seems to be func.octet_length(OBJ.columname) though All the documentation is very confusing, I started out with essential SQLAlchemy which is completely outdated by now... The online docs are not very helpful if you don't know what yu're lokking for. The column

[sqlalchemy] Re: limit the set of returned columns

2008-10-07 Thread Michael Bayer
another option for blob columns and similar is the deferred() property, which will only load that column on the instance when first accessed. this is also in the docs (and probably is in the book too). On Oct 7, 10:03 am, Martijn Moeling [EMAIL PROTECTED] wrote: Thanx! In Mysql it seems to

[sqlalchemy] Re: add_entity(y) and join(y)

2008-10-07 Thread Michael Bayer
yeah a ticket helps since thats a lot for me to try to parse --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: add_entity(y) and join(y)

2008-10-07 Thread az
and may be related note: the add_entity() seems to be able to add whole classes and separate class.attributes, but this isnt mentioned even in the docstrings (what is entity anyway?). add_column() also isnt in the docs. --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: limit the set of returned columns

2008-10-07 Thread Martijn Moeling
If found that, but that is exactly the opposite of what I want, since with webdav first is looked for the files, a user might choose one of them to open/edit en than the blob needs to be loaded On Oct 7, 2008, at 4:27 PM, Michael Bayer wrote: another option for blob columns and

[sqlalchemy] Re: add_entity(y) and join(y)

2008-10-07 Thread az
On Tuesday 07 October 2008 17:30:31 Michael Bayer wrote: yeah a ticket helps since thats a lot for me to try to parse #1188 is for A.join/add_entity mixture; i could not invent a way to pass proper with_polymorphic to declarative so it's set to ('*',None) to trigger aliasing. #1189 is for

[sqlalchemy] in_( bindparam ) ?

2008-10-07 Thread az
q.filter( x.in_( somelistorset )) works q.filter( x.in_( bindparam('somename') )) fails ... File sqlalchemy/sql/expression.py, line 1368, in _in_impl for o in seq_or_selectable: TypeError: '_BindParamClause' object is not iterable --~--~-~--~~~---~--~~ You