we are migrating our existing backend from PHP to Ruby.
We are using Sequel with Models but we can't do some queries because there
is no way to use the MySQL function UNIX_TIMESTAMP.
I would like to create a query like this:
:field_1 => 0,
:field_2 => 0,
:field_3 => Service::SERVICE_STATUS_ACTIVE,
(suspend_date - Sequel::UNIX_TIMESTAMP) > 0
(suspend_date - Sequel::UNIX_TIMESTAMP) < time
I've seen there is already existing a CURRENT_TIMESTAMP constant but this
does not work in our case.
The existing database field is a int instead of a datetime field.
It would be really awesome if Sequel will add the UNIX_TIMESTAMP mysql
method for Model queries.
I've done it temporary with using a timestamp variable (timestamp =
but I would recommend to use the MySQL server time instead of the API
Thank you very much!
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.