Replies: 2 comments 2 replies
-
You can provide a string in the same format that PostgreSQL uses, since pg_range already handles that. If that works, I think it's better than adding support for arrays. Can you try that? |
Beta Was this translation helpful? Give feedback.
-
We have a plugin for PG ranges that we use in all our project, feel free to use it for inspiration: https://github.com/lithictech/sequel-tstzrange-fields/blob/main/spec/sequel/plugins/tstzrange_fields_spec.rb You can do stuff like I'm not sure if it's worth making that plugin work for non-tstz ranges, but feel free to use the code and modify it for tsrange, or fork it and add support for other range types, whatever you want, if you think it's useful. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, Jeremy et all,
I've had to create this workaround for creating a fixture (via fixture_dependencies) that creates a model record which has a
tsrange
field.I'm wondering if this is something that should be done by the
pg_range
extension when creating the SQL expression? I know this is a special case, so perhaps this is the best I'm going to get with YAML as the base.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions