Works like a charm. Thanks, Bryan
On Mar 5, 4:29 pm, "Michael Bayer" <[email protected]> wrote: > how about func.convert(literal_column("UUID() USING utf8")) > > Bryan wrote: > > > I want to use MySQL's uuid() function to create default values for a > > column. I need to convert the output of uuid() to utf-8 however, so > > the full function in SQL looks like this: > > > CONVERT(UUID() USING utf8) > > > I can't set this as a column default using the func.function() syntax, > > because python complains about invalid syntax when it encounters the > > USING part. > > > How can I set this chain of functions as a default? Is there some sort > > of SQL literal function that I could use? I tried using the literal > > object, but it of course escapes whatever the value is which does not > > work. > > > Bryan > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
