elasticsearch_record 3.0.0 → 4.0.0
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/README.md +11 -3
- data/docs/CHANGELOG.md +6 -0
- data/elasticsearch_record.gemspec +1 -1
- data/lib/active_record/connection_adapters/elasticsearch/column.rb +0 -0
- data/lib/active_record/connection_adapters/elasticsearch/schema_dumper.rb +0 -2
- data/lib/active_record/connection_adapters/elasticsearch_adapter.rb +3 -1
- data/lib/elasticsearch_record/gem_version.rb +1 -1
- data/lib/elasticsearch_record/result.rb +10 -0
- data/lib/elasticsearch_record/statement_cache.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3d4d1dd73be19114191e80cba0ec2844ab3049e380998f8ba48fed78f5c5837
|
|
4
|
+
data.tar.gz: 252d5abb68af3199c73850337aac6d6ce2c6e379a9fd5f2bea1656447da29995
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 635066f96fb6713a4719ac6fc2a4338dd967b7ca990c9d2c1e644ca05a749be4932f9a07277a42da5340530f0291d7a2bd06edcfdaf89cdcda844339ede6b4fa
|
|
7
|
+
data.tar.gz: 324d987c404a4dd0069d48c30866c6b854719eec91e3051321396ecf457b160dd16dfc29d47427c4e4a7193fc5d82e721f89013ae692ca9cc4642bb005503cb8
|
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ _ElasticsearchRecord is a ActiveRecord adapter and provides similar functionalit
|
|
|
16
16
|
|
|
17
17
|
**PLEASE NOTE:**
|
|
18
18
|
|
|
19
|
-
- This is the `main`-branch, which supports rails **
|
|
19
|
+
- This is the `main`-branch, which supports rails **8.0** _(see section 'Rails_Versions' for supported versions)_
|
|
20
20
|
- supports ActiveRecord ~> 7.2 + Elasticsearch >= 7.17
|
|
21
21
|
- added features up to Elasticsearch `8.17.1` _(tested against `8.19.14`)_
|
|
22
22
|
- _ES|QL_ queries _(`TYPE_ESQL` / the `esql.query` gate)_ require **Elasticsearch >= 8.11**, where the feature became
|
|
@@ -28,15 +28,23 @@ _ElasticsearchRecord is a ActiveRecord adapter and provides similar functionalit
|
|
|
28
28
|
|
|
29
29
|
Supported rails versions:
|
|
30
30
|
|
|
31
|
+
### Rails 8.0:
|
|
32
|
+
_(since gem version 4.0)_
|
|
33
|
+
|
|
34
|
+
https://github.com/ruby-smart/elasticsearch_record/tree/rails-8-0-stable
|
|
35
|
+
|
|
36
|
+
[](https://github.com/ruby-smart/elasticsearch_record/tree/rails-8-0-stable)
|
|
37
|
+
|
|
38
|
+
|
|
31
39
|
### Rails 7.2:
|
|
32
|
-
_(since gem version
|
|
40
|
+
_(since gem version 3.0)_
|
|
33
41
|
|
|
34
42
|
https://github.com/ruby-smart/elasticsearch_record/tree/rails-7-2-stable
|
|
35
43
|
|
|
36
44
|
[](https://github.com/ruby-smart/elasticsearch_record/tree/rails-7-2-stable)
|
|
37
45
|
|
|
38
46
|
### Rails 7.1:
|
|
39
|
-
_(since gem version
|
|
47
|
+
_(since gem version 2.0)_
|
|
40
48
|
|
|
41
49
|
https://github.com/ruby-smart/elasticsearch_record/tree/rails-7-1-stable
|
|
42
50
|
|
data/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# ElasticsearchRecord - CHANGELOG
|
|
2
2
|
|
|
3
|
+
## [4.0.0] - 2026-09-08
|
|
4
|
+
* [add] **BREAKING**: requires `activerecord ~> 8.0.0`
|
|
5
|
+
* [add] `ElasticsearchRecord::Result#indexed_rows` - rails 8.0 instantiates records through this method instead of iterating the result set itself.
|
|
6
|
+
* [ref] `ElasticsearchAdapter#log` resolves the instrumenter through `#instrumenter` instead of the former `@instrumenter` ivar
|
|
7
|
+
* [ref] `ActiveRecord::ConnectionAdapters::Elasticsearch::SchemaDumper` remove redundant blank lines
|
|
8
|
+
|
|
3
9
|
## [3.0.0] - 2026-09-08
|
|
4
10
|
* [add] **BREAKING**: requires `activerecord ~> 7.2.0`
|
|
5
11
|
* [add] `Quoting::ClassMethods#quote_column_name` & `#quote_table_name` - identifier quoting is class-level & mandatory now
|
|
@@ -32,7 +32,7 @@ DESC
|
|
|
32
32
|
|
|
33
33
|
spec.require_paths = ["lib"]
|
|
34
34
|
|
|
35
|
-
spec.add_dependency 'activerecord', '~>
|
|
35
|
+
spec.add_dependency 'activerecord', '~> 8.0.0'
|
|
36
36
|
spec.add_dependency 'elasticsearch', '>= 7.17'
|
|
37
37
|
|
|
38
38
|
spec.add_development_dependency 'coveralls_reborn', '~> 0.25'
|
|
File without changes
|
|
@@ -151,14 +151,12 @@ module ActiveRecord
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
tbl.puts " end"
|
|
154
|
-
tbl.puts
|
|
155
154
|
|
|
156
155
|
tbl.rewind
|
|
157
156
|
stream.print tbl.read
|
|
158
157
|
rescue => e
|
|
159
158
|
stream.puts "# Could not dump table #{table.inspect} because of following #{e.class}"
|
|
160
159
|
stream.puts "# #{e.message}"
|
|
161
|
-
stream.puts
|
|
162
160
|
ensure
|
|
163
161
|
self.table_name = nil
|
|
164
162
|
end
|
|
@@ -384,7 +384,9 @@ module ActiveRecord # :nodoc:
|
|
|
384
384
|
# @raise [Exception] any exception encountered during execution, after translation.
|
|
385
385
|
# @return [void]
|
|
386
386
|
def log(gate, arguments, name = 'QUERY', async: false, statistics: nil, &block)
|
|
387
|
-
|
|
387
|
+
# +instrumenter+ instead of the former +@instrumenter+ ivar - the abstract adapter
|
|
388
|
+
# resolves it per execution context now
|
|
389
|
+
instrumenter.instrument(
|
|
388
390
|
"query.elasticsearch_record",
|
|
389
391
|
gate: gate,
|
|
390
392
|
name: name,
|
|
@@ -172,6 +172,16 @@ module ElasticsearchRecord
|
|
|
172
172
|
n ? computed_results.last(n) : computed_results.last
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
+
# Returns the rows to instantiate records from - ActiveRecord resolves them through this
|
|
176
|
+
# method instead of iterating the result set itself.
|
|
177
|
+
# Each element is a Hash keyed by column / metadata name and therefore already provides the
|
|
178
|
+
# read surface of +ActiveRecord::Result::IndexedRow+ (+key?+, +[]+, +fetch+, +keys+, ...).
|
|
179
|
+
# used by +ActiveRecord+
|
|
180
|
+
# @return [Array<Hash>]
|
|
181
|
+
def indexed_rows # :nodoc:
|
|
182
|
+
computed_results
|
|
183
|
+
end
|
|
184
|
+
|
|
175
185
|
# used by ActiveRecord
|
|
176
186
|
def cancel # :nodoc:
|
|
177
187
|
self
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elasticsearch_record
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tobias Gonsior
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 8.0.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
25
|
+
version: 8.0.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: elasticsearch
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|