<commit_before>module ActiveRecord  # :nodoc:

  module ConnectionAdapters  # :nodoc:

    module PostGISAdapter  # :nodoc:


      class SpatialColumn < ConnectionAdapters::PostgreSQLColumn  # :nodoc:


        def initialize(factory_settings_, table_name_, name_, default_, oid_type_, sql_type_=nil, null_=true, opts_=nil)
          @factory_settings = factory_settings_
          @table_name = table_name_
          @geographic = sql_type_ =~ /geography/i ? true : false
          if opts_
            # This case comes from an entry in the geometry_columns table
            @geometric_type = ::RGeo::ActiveRecord.geometric_type_from_name(opts_[:type]) ||
              ::RGeo::Feature::Geometry
            @srid = opts_[:srid].to_i
            @has_z = opts_[:has_z] ? true : false
            @has_m = opts_[:has_m] ? true : false
          elsif @geographic
            # Geographic type information is embedded in the SQL type
            @geometric_type = ::RGeo::Feature::Geometry
            @srid = 4326
            @has_z = @has_m = false<commit_msg>Use !! to force booleans<commit_after>module ActiveRecord  # :nodoc:

  module ConnectionAdapters  # :nodoc:

    module PostGISAdapter  # :nodoc:


      class SpatialColumn < ConnectionAdapters::PostgreSQLColumn  # :nodoc:


        def initialize(factory_settings_, table_name_, name_, default_, oid_type_, sql_type_=nil, null_=true, opts_=nil)
          @factory_settings = factory_settings_
          @table_name = table_name_
          @geographic = !!(sql_type_ =~ /geography/i)
          if opts_
            # This case comes from an entry in the geometry_columns table
            @geometric_type = ::RGeo::ActiveRecord.geometric_type_from_name(opts_[:type]) || ::RGeo::Feature::Geometry
            @srid = opts_[:srid].to_i
            @has_z = !!opts_[:has_z]
            @has_m = !!opts_[:has_m]
          elsif @geographic
            # Geographic type information is embedded in the SQL type
            @geometric_type = ::RGeo::Feature::Geometry
            @srid = 4326
            @has_z = @has_m = false
{'fraction_non_alphanumeric': 0.09674329501915709, 'fraction_numerical': 0.0038314176245210726, 'mean_word_length': 2.5466893039049237, 'pattern_counts': {'":': 0, '<': 5, '<?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': '985416', 'n_tokens_mistral': 650, 'n_tokens_neox': 617, 'n_words': 144}