Class: ActiveRecord::Searchable::Adapter
- Inherits:
-
Object
- Object
- ActiveRecord::Searchable::Adapter
show all
- Defined in:
- lib/activerecord/searchable/adapter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.for(connection) ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/activerecord/searchable/adapter.rb', line 6
def self.for(connection)
case connection.adapter_name
when /sqlite/i
Adapters::SQLite.new(connection)
else
raise NotImplementedError,
"Search not supported for #{connection.adapter_name}. " \
"Currently only SQLite with FTS5 is supported."
end
end
|
Instance Method Details
#delete_sql(config, record_id) ⇒ Object
42
43
44
|
# File 'lib/activerecord/searchable/adapter.rb', line 42
def delete_sql(config, record_id)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#insert_sql(config, record_id, values) ⇒ Object
34
35
36
|
# File 'lib/activerecord/searchable/adapter.rb', line 34
def insert_sql(config, record_id, values)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#join_clause(config) ⇒ Object
Abstract methods - must be implemented by subclasses
18
19
20
|
# File 'lib/activerecord/searchable/adapter.rb', line 18
def join_clause(config)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#ranking_order_clause(config) ⇒ Object
30
31
32
|
# File 'lib/activerecord/searchable/adapter.rb', line 30
def ranking_order_clause(config)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#select_clause_for_highlights(config) ⇒ Object
26
27
28
|
# File 'lib/activerecord/searchable/adapter.rb', line 26
def select_clause_for_highlights(config)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#update_sql(config, record_id, values) ⇒ Object
38
39
40
|
# File 'lib/activerecord/searchable/adapter.rb', line 38
def update_sql(config, record_id, values)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|
#where_clause(config) ⇒ Object
22
23
24
|
# File 'lib/activerecord/searchable/adapter.rb', line 22
def where_clause(config)
raise NotImplementedError, "#{self.class} must implement ##{__method__}"
end
|