<commit_before># frozen_string_literal: true

module OData
  class SimpleEntity
    attr_reader :name, :plural_name, :qualified_name, :key_property, :properties, :navigation_properties,
      :extra_tags

    # Property types are defined in odata_server's
    # `Property.column_adapter_return_types` static variable.
    def initialize(name, key_name: "ID", property_types: {}, extra_tags: {})
      @name = name
      @plural_name = name
      @qualified_name = name
      @key_property = SimpleProperty.new(name: key_name)
      @properties = property_types.transform_values { |type| SimpleProperty.new(return_type: type) }
      @navigation_properties = []
      @extra_tags = extra_tags
    end<commit_msg>10594: Default to nil key_property<commit_after># frozen_string_literal: true

module OData
  class SimpleEntity
    attr_reader :name, :plural_name, :qualified_name, :key_property, :properties, :navigation_properties,
      :extra_tags

    # Property types are defined in odata_server's
    # `Property.column_adapter_return_types` static variable.
    def initialize(name, key_name: nil, property_types: {}, extra_tags: {})
      @name = name
      @plural_name = name
      @qualified_name = name
      @key_property = key_name ? SimpleProperty.new(name: key_name) : nil
      @properties = property_types.transform_values { |type| SimpleProperty.new(return_type: type) }
      @navigation_properties = []
      @extra_tags = extra_tags
    end
{'fraction_non_alphanumeric': 0.09389993145990404, 'fraction_numerical': 0.003427004797806717, 'mean_word_length': 4.12280701754386, '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': '5196644', 'n_tokens_mistral': 441, 'n_tokens_neox': 431, 'n_words': 101}