[storm] setting a database timestamp
Martin DeMello
martindemello at gmail.com
Wed Apr 22 02:18:49 BST 2009
On Wed, Apr 22, 2009 at 6:35 AM, Duncan M. McGreggor
<duncan.mcgreggor at gmail.com> wrote:
>
> I think you're going to love this :-) This is actually one of my
> favorite little features of Storm.
>
> To create a Python Storm function for a database function, all you need
> to do is import NamedFunc, subclass it, and define the function name.
> You can then use it in Storm Python expressions.
>
> For example:
>
> from storm.expr import NamedFunc
>
>
> class CurrentTimestamp(NamedFunc):
> __slots__ = ()
> name = "CURRENT_TIMESTAMP"
>
> Hope that helps!
That's wonderful, thanks :)
martin
More information about the storm
mailing list