Replies: 1 comment 1 reply
-
There isn't generic support for named function arguments currently. For your example, the date_arithmetic extension should do what you want: DB.select(Sequel.date_add(Sequel::CURRENT_TIMESTAMP, days: 3))
# SELECT (CAST(CURRENT_TIMESTAMP AS timestamp) + make_interval(days := 3)) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does Sequel support named function arguments in addition to positional arguments? I'm not sure if any databases other than PostgreSQL support them, but I think the answer from looking at the Sequel documentation and the code is "no".
Here's an example:
In that particular case, I think you could use
'3 days'::interval
as a workaround, which Sequel does support, but that's not the case with most functions.Beta Was this translation helpful? Give feedback.
All reactions