Hello! I'm using Storm with a mysql backend, and I'm doing a select with an
expression, like this:
result = self.store.find((Report, SQL("CURRENT_TIMESTAMP") - Report.timestamp
as age), SQL("CURRENT_TIMESTAMP") - Report.timestamp < $max_age)
i.e:
SELECT *, (CURRENT_TIMESTAMP - timestamp) AS age FROM report WHERE
report.(CURRENT_TIMESTAMP - timestamp) < $max_age;
(notice the "AS age")
So I want to use the new column in Storm, but do not know how to achieve that.
Thanks!
PS: If you know how to optimise away writing "SQL("CURRENT_TIMESTAMP") -
Report.timestamp" twice, that would be SUPER :-)
--
BR/D
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm