sequel-tstzrange-fields 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sequel/plugins/tstzrange_fields.rb +1 -1
- data/lib/sequel_tstzrange_fields/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ce882832d62ea1342d7daaea5e30958d2bda7f52f02d6279d0f03b38b4b0a10
|
|
4
|
+
data.tar.gz: 99d7b2e90fe4b6d050f9e4f856d709bab47a97cf658ecf12c57131705006a89e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0389be6b6156008e52eb8db931bd1b710aa444ec877a1971c7255cca008c9650e46d14ea107525ddae52447cbdc41dcb901425b1ebcf168a870ee2741272fca0'
|
|
7
|
+
data.tar.gz: cd145bb21d5a9b24c260bcbf342bcc214dc7a1eac5adbb05f8ab64ed47b148921b7545866f1750dedc41d83f76113760457a882457f73517998968847223f9b4
|
|
@@ -130,7 +130,7 @@ module Sequel
|
|
|
130
130
|
# Limit the dataset to the rows where the tstzrange column contains the given value.
|
|
131
131
|
# val is cast into a timestamptz.
|
|
132
132
|
# column is the default/first tstzrange column if not given.
|
|
133
|
-
def
|
|
133
|
+
def tstzrange_contains(val, column: nil)
|
|
134
134
|
column ||= self.model.tstzrange_columns.first
|
|
135
135
|
self.where(Sequel.pg_range(column).contains(Sequel.cast(val, :timestamptz)))
|
|
136
136
|
end
|