Skip to content

Commit 3eba286

Browse files
authored
Merge pull request rails#55311 from tarellel/main
Cleanup typos and grammer in database adapter comments
2 parents 04690da + 6daec77 commit 3eba286

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def clear_active_connections!(role = nil)
168168
end
169169
end
170170

171-
# Clears the cache which maps classes.
171+
# Clears reloadable connection caches in all connection pools.
172172
#
173173
# See ConnectionPool#clear_reloadable_connections! for details.
174174
def clear_reloadable_connections!(role = nil)

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class ConnectionPool
129129
else
130130
class WeakThreadKeyMap # :nodoc:
131131
# FIXME: On 3.3 we could use ObjectSpace::WeakKeyMap
132-
# but it currently cause GC crashes: https://github.com/byroot/rails/pull/3
132+
# but it currently causes GC crashes: https://github.com/byroot/rails/pull/3
133133
def initialize
134134
@map = {}
135135
end
@@ -518,7 +518,7 @@ def discarded? # :nodoc:
518518
@connections.nil?
519519
end
520520

521-
# Clears the cache which maps classes and re-connects connections that
521+
# Clears reloadable connections from the pool and re-connects connections that
522522
# require reloading.
523523
#
524524
# Raises:
@@ -541,7 +541,7 @@ def clear_reloadable_connections(raise_on_acquisition_timeout = true)
541541
end
542542
end
543543

544-
# Clears the cache which maps classes and re-connects connections that
544+
# Clears reloadable connections from the pool and re-connects connections that
545545
# require reloading.
546546
#
547547
# The pool first tries to gain ownership of all connections. If unable to

activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def rename_enum_value(type_name, **options)
612612
}
613613
end
614614

615-
# Returns the configured supported identifier length supported by PostgreSQL
615+
# Returns the configured maximum supported identifier length supported by PostgreSQL
616616
def max_identifier_length
617617
@max_identifier_length ||= query_value("SHOW max_identifier_length", "SCHEMA").to_i
618618
end

activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notif
134134
end
135135

136136
def cast_result(result)
137-
# Given that SQLite3 doesn't really a Result type, raw_execute already return an ActiveRecord::Result
138-
# and we have nothing to cast here.
137+
# Given that SQLite3 doesn't have a Result type, raw_execute already returns an ActiveRecord::Result
138+
# so we have nothing to cast here.
139139
result
140140
end
141141

activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module ConnectionAdapters # :nodoc:
4141
#
4242
# There may be other options available specific to the SQLite3 driver. Please read the
4343
# documentation for
44-
# {SQLite::Database.new}[https://sparklemotion.github.io/sqlite3-ruby/SQLite3/Database.html#method-c-new]
44+
# {SQLite3::Database.new}[https://sparklemotion.github.io/sqlite3-ruby/SQLite3/Database.html#method-c-new]
4545
#
4646
class SQLite3Adapter < AbstractAdapter
4747
ADAPTER_NAME = "SQLite"
@@ -337,7 +337,7 @@ def virtual_tables
337337
# Creates a virtual table
338338
#
339339
# Example:
340-
# create_virtual_table :emails, :fts5, ['sender', 'title',' body']
340+
# create_virtual_table :emails, :fts5, ['sender', 'title', 'body']
341341
def create_virtual_table(table_name, module_name, values)
342342
exec_query "CREATE VIRTUAL TABLE IF NOT EXISTS #{table_name} USING #{module_name} (#{values.join(", ")})"
343343
end

0 commit comments

Comments
 (0)