On Mar 18, 12:24 pm, Jonathan Vanasco <[email protected]> wrote: > let me simplify this , maybe it'll make sense to someone presented > differently: > > # do we need to restrict this within a date range ? > dates= [] > if date_start: > dates.append( class_a.timestamp_registered >= > date_start ) > if date_end: > dates.append( class_a.timestamp_registered <= > date_end ) > if sql_and: > dates.append( sql_and ) > if dates : > dates= sqlalchemy.sql.and_( *dates ) > > # generate the sql > sql= sqlalchemy.select( \ > [ > class_a_table.name+'.id', > 'nickname', > 'email_address_id', > 'email_address', > 'timestamp_registered', > ], > dates, > from_obj=[ class_a._osn_table_sa_stash.outerjoin( class_b_table ) ], > order_by=[ class_b_table.name +'.id'], > )
there's nothing present in these examples that would suggest that the literal value attached to a bind would be lost. Its not clear what "sql_and" is here. For further help you'd have to illustrate how your behavior can be reproduced exactly. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
