Class: Esse::Repository

Inherits:
Object
  • Object
show all
Extended by:
Deprecations::Deprecate, ClassMethods
Defined in:
lib/esse/repository.rb,
lib/esse/repository/actions.rb,
lib/esse/repository/documents.rb,
lib/esse/deprecations/repository.rb,
lib/esse/repository/object_document_mapper.rb,
lib/esse/repository/lazy_document_attributes.rb

Overview

Definition for the lazy document attributes

Defined Under Namespace

Modules: ClassMethods

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from ClassMethods

action, collection, collection_class, document, documents, documents_for_lazy_attribute, each_serialized_batch, fetch_lazy_document_attribute, import, lazy_document_attribute, lazy_document_attribute_names, lazy_document_attributes, retrieve_lazy_attribute_values, serialize, update_documents_attribute

Methods included from Deprecations::Deprecate

extended

Class Attribute Details

.indexObject (readonly)

This methods will be defined using meta programming in the index respository definition

See Also:

  • Index::Type.repository


11
12
13
# File 'lib/esse/repository.rb', line 11

def index
  @index
end

Class Method Details

.backendObject



29
30
31
# File 'lib/esse/deprecations/repository.rb', line 29

def backend
  Esse::Deprecations::RepositoryBackendDelegator.new(:backend, self)
end

.elasticsearchObject



25
26
27
# File 'lib/esse/deprecations/repository.rb', line 25

def elasticsearch
  Esse::Deprecations::RepositoryBackendDelegator.new(:elasticsearch, self)
end

.mappings(*args, &block) ⇒ Object



13
14
15
16
17
# File 'lib/esse/deprecations/repository.rb', line 13

def mappings(*args, &block)
  warning("#{self}.mappings", "#{index}.mappings", 2023, 12)

  index.mappings(*args, &block)
end

.serializer(*args, **kwargs, &block) ⇒ Object



19
20
21
22
23
# File 'lib/esse/deprecations/repository.rb', line 19

def serializer(*args, **kwargs, &block)
  warning("#{self}.serializer", "#{self}.document", 2023, 12)

  document(*args, **kwargs, &block)
end

.type_nameObject



8
9
10
# File 'lib/esse/deprecations/repository.rb', line 8

def type_name
  repo_name
end