Skip to content

Commit b21062f

Browse files
committed
Fixed comments for ActiveRecord 5.2.x methods
1 parent 378a594 commit b21062f

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

lib/active_record/connection_adapters/cockroachdb/quoting.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ def _quote(value)
3030
else
3131
super
3232
end
33-
# if value.is_a?(Numeric)
34-
# "'#{quote_string(value.to_s)}'"
35-
# elsif RGeo::Feature::Geometry.check_type(value)
36-
# "'#{RGeo::WKRep::WKBGenerator.new(hex_format: true, type_format: :ewkb, emit_ewkb_srid: true).generate(value)}'"
37-
# elsif value.is_a?(RGeo::Cartesian::BoundingBox)
38-
# "'#{value.min_x},#{value.min_y},#{value.max_x},#{value.max_y}'::box"
39-
# else
40-
# super
41-
# end
4233
end
4334
end
4435
end

lib/active_record/connection_adapters/cockroachdb_adapter.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ class CockroachDBAdapter < PostgreSQLAdapter
7575
# override
7676
# This method makes a sql query to gather information about columns
7777
# in a table. It returns an array of arrays (one for each col) and
78-
# passes each to the SchemaStatements#new_column_from_field method
79-
# as the field parameter. This data is then used to format the column
80-
# objects for the model and sent to the OID for data casting.
78+
# is mapped to columns in the SchemaStatements#columns method.
8179
#
82-
# The issue with the default method is that the sql_type field is
80+
# The issue with the default method is that the sql_type field is
8381
# retrieved with the `format_type` function, but this is implemented
8482
# differently in CockroachDB than PostGIS, so geometry/geography
8583
# types are missing information which makes parsing them impossible.
@@ -92,7 +90,7 @@ class CockroachDBAdapter < PostgreSQLAdapter
9290
#
9391
# The solution is to make the default query with super, then
9492
# iterate through the columns and if it is a spatial type,
95-
# access the proper column_type with the information_schema.columns
93+
# access the proper column_type with the information_schema.columns
9694
# table.
9795
#
9896
# @see: https://github.com/rails/rails/blob/8695b028261bdd244e254993255c6641bdbc17a5/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L829

0 commit comments

Comments
 (0)