<commit_before>module DataMapper

  # Abstract class for DataMapper engines
  #
  # @abstract
  class Engine

    include AbstractClass

    # Returns the database adapter used by the engine
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.adapter
    #
    # @return [Object]
    #
    # @api public
    attr_reader :adapter

    # Returns the relation registry used by the engine
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relations
    #
    # @return [RelationRegistry]
    #
    # @api public
    attr_reader :relations

    # Initializes an engine instance
    #
    # @param [String] uri
    #   the database connection URI
    #
    # @return [undefined]
    #
    # @api private
    def initialize(uri = nil)
      @uri       = uri
      @relations = RelationRegistry.new(self)
    end

    # Returns the relation node class used in the relation registry
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relation_node_class
    #
    # @return [Class]
    #
    # @api public
    def relation_node_class
      RelationRegistry::RelationNode
    end

    # Returns the relation edge class used in the relation registry
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relation_edge_class
    #
    # @return [Class]
    #
    # @api public
    def relation_edge_class
      RelationRegistry::RelationEdge
    end

    # Builds a relation instance that will be wrapped in a relation node
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.base_relation(:foo)
    #
    # @param [Symbol] name
    #   the base relation name
    #
    # @abstract
    #
    # @return [Object]
    #
    # @api public
    abstract_method :base_relation<commit_msg>Add missing @raise tag for Engine#base_relation<commit_after>module DataMapper

  # Abstract class for DataMapper engines
  #
  # @abstract
  class Engine

    include AbstractClass

    # Returns the database adapter used by the engine
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.adapter
    #
    # @return [Object]
    #
    # @api public
    attr_reader :adapter

    # Returns the relation registry used by the engine
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relations
    #
    # @return [RelationRegistry]
    #
    # @api public
    attr_reader :relations

    # Initializes an engine instance
    #
    # @param [String] uri
    #   the database connection URI
    #
    # @return [undefined]
    #
    # @api private
    def initialize(uri = nil)
      @uri       = uri
      @relations = RelationRegistry.new(self)
    end

    # Returns the relation node class used in the relation registry
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relation_node_class
    #
    # @return [Class]
    #
    # @api public
    def relation_node_class
      RelationRegistry::RelationNode
    end

    # Returns the relation edge class used in the relation registry
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.relation_edge_class
    #
    # @return [Class]
    #
    # @api public
    def relation_edge_class
      RelationRegistry::RelationEdge
    end

    # Builds a relation instance that will be wrapped in a relation node
    #
    # @example
    #   uri    = "postgres://localhost/test"
    #   engine = DataMapper::Engine::VeritasEngine.new(uri)
    #   engine.base_relation(:foo)
    #
    # @param [Symbol] name
    #   the base relation name
    #
    # @abstract
    #
    # @raise NotImplementedError
    #
    # @return [Object]
    #
    # @api public
    abstract_method :base_relation
{'fraction_non_alphanumeric': 0.0969091331629096, 'fraction_numerical': 0.0, 'mean_word_length': 2.285496183206107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2818454', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1286, 'n_words': 316}