in one case the update() statement is constructed knowing the VALUES clause ahead of time so that it can render the NOW() function. In the latter case, execute() compiles the update() statement passing along the key names of the given parameters but not the values, which are all assumed to be bind parameters. its primarily an implementation detail for internal performance purposes.
Moshe C. wrote: > > table.update(criterion, values={'last_edited' : func.now()} ).execute > () > works > > but > table.update(criterion ).execute({'last_edited' : func.now()}) > does not. It tries to set 'last_edited' to functions object. > > Can someone clarify the difference ? > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---