I've got two issues, the first is that I have a column that is basically 
a random number.. But, I cant quite figure out how to get in inserted 
correctly, what I thought would work is something akin to the following 
code:

        inv = schema.Invite()
        inv.invite_id       = SQL("MD5(UUID())")
        inv.account_id   = acct.id
        inv.email            = unicode(toaddr)
   
        store.add(inv)

Of course, first I get an exception that 'invite_id' is not unicode 
(since it's defined as Unicode() column).   Of course a quick cast to 
unicode(...) yeilds nothing but trouble.  So, is there a way I can pass 
a SQL expression into an add(...) statement?

I'm finding it a bit tidious to constantly be casting from str(...) to 
unicode(...) to keep the database happy.  Is there really a best 
practice for how to have VARCHAR columns that are should be treated as 
RawStr() for purposes of development?

Thanks

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to