arel_extensions 2.0.21 → 2.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arel_extensions.rb +6 -0
- data/lib/arel_extensions/nodes/length.rb +6 -0
- data/lib/arel_extensions/string_functions.rb +10 -2
- data/lib/arel_extensions/version.rb +1 -1
- data/lib/arel_extensions/visitors/mssql.rb +1 -1
- data/lib/arel_extensions/visitors/oracle.rb +1 -1
- data/lib/arel_extensions/visitors/to_sql.rb +1 -1
- data/version_v1.rb +1 -1
- data/version_v2.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57188b98a348ea5dd72994ef0edb94cb386104cbd50d863b3cc465bb81499f8f
|
4
|
+
data.tar.gz: 7235c655967c8058e24f85f96b1a3ea93803dc759906ea24aff360edf28ee6fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c60be09bdf31efe2b4a953c0b097bbc461d01a4d7005c1dc190af20efb12e659d2331e16d8ca47527b9757b89a2528069fa1a8a94cfd52bc80000633995b229f
|
7
|
+
data.tar.gz: b028042975ab07e0d28e919278c36f2652fae79dbced3776e16519f4fdfaaf45de32a0a375cb7e77d5157775d2a3ef8555f9096299b2c71f366367e6452a93a6
|
data/lib/arel_extensions.rb
CHANGED
@@ -158,6 +158,9 @@ class Arel::Nodes::Unary
|
|
158
158
|
include ArelExtensions::MathFunctions
|
159
159
|
include ArelExtensions::Comparators
|
160
160
|
include ArelExtensions::Predications
|
161
|
+
def eql? other
|
162
|
+
hash == other.hash
|
163
|
+
end
|
161
164
|
end
|
162
165
|
|
163
166
|
class Arel::Nodes::Binary
|
@@ -167,6 +170,9 @@ class Arel::Nodes::Binary
|
|
167
170
|
include ArelExtensions::Comparators
|
168
171
|
include ArelExtensions::BooleanFunctions
|
169
172
|
include ArelExtensions::Predications
|
173
|
+
def eql? other
|
174
|
+
hash == other.hash
|
175
|
+
end
|
170
176
|
end
|
171
177
|
|
172
178
|
class Arel::Nodes::Equality
|
@@ -24,9 +24,17 @@ module ArelExtensions
|
|
24
24
|
ArelExtensions::Nodes::FindInSet.new [other, self]
|
25
25
|
end
|
26
26
|
|
27
|
-
# LENGTH function returns the length of the value in a text field.
|
27
|
+
# LENGTH function returns the length (bytewise) of the value in a text field.
|
28
28
|
def length
|
29
|
-
ArelExtensions::Nodes::Length.new
|
29
|
+
ArelExtensions::Nodes::Length.new self, true
|
30
|
+
end
|
31
|
+
|
32
|
+
def byte_length
|
33
|
+
ArelExtensions::Nodes::Length.new self, true
|
34
|
+
end
|
35
|
+
|
36
|
+
def char_length
|
37
|
+
ArelExtensions::Nodes::Length.new self, false
|
30
38
|
end
|
31
39
|
|
32
40
|
# LOCATE function returns the first starting position of a string in another string.
|
data/version_v1.rb
CHANGED
data/version_v2.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yann Azoury
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-04-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|