File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
activerecord/lib/active_record
railties/lib/rails/commands/dbconsole Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 8
8
9
9
module ActiveRecord
10
10
module ConnectionHandling # :nodoc:
11
- def mysql2_connection_class
11
+ def mysql2_adapter_class
12
12
ConnectionAdapters ::Mysql2Adapter
13
13
end
14
14
15
15
# Establishes a connection to the database that's used by all Active Record objects.
16
16
def mysql2_connection ( config )
17
- mysql2_connection_class . new ( config )
17
+ mysql2_adapter_class . new ( config )
18
18
end
19
19
end
20
20
Original file line number Diff line number Diff line change 21
21
22
22
module ActiveRecord
23
23
module ConnectionHandling # :nodoc:
24
- def postgresql_connection_class
24
+ def postgresql_adapter_class
25
25
ConnectionAdapters ::PostgreSQLAdapter
26
26
end
27
27
28
28
# Establishes a connection to the database that's used by all Active Record objects
29
29
def postgresql_connection ( config )
30
- postgresql_connection_class . new ( config )
30
+ postgresql_adapter_class . new ( config )
31
31
end
32
32
end
33
33
Original file line number Diff line number Diff line change 15
15
16
16
module ActiveRecord
17
17
module ConnectionHandling # :nodoc:
18
- def sqlite3_connection_class
18
+ def sqlite3_adapter_class
19
19
ConnectionAdapters ::SQLite3Adapter
20
20
end
21
21
22
22
def sqlite3_connection ( config )
23
- sqlite3_connection_class . new ( config )
23
+ sqlite3_adapter_class . new ( config )
24
24
end
25
25
end
26
26
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def adapter_method
18
18
end
19
19
20
20
def adapter_class_method
21
- "#{ adapter } _connection_class "
21
+ "#{ adapter } _adapter_class "
22
22
end
23
23
24
24
def host
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def initialize(options = {})
16
16
end
17
17
18
18
def start
19
- connection_class . dbconsole ( db_config , @options )
19
+ adapter_class . dbconsole ( db_config , @options )
20
20
rescue NotImplementedError
21
21
abort "Unknown command-line client for #{ db_config . database } ."
22
22
end
@@ -50,7 +50,7 @@ def environment
50
50
end
51
51
52
52
private
53
- def connection_class
53
+ def adapter_class
54
54
if ActiveRecord ::Base . respond_to? ( db_config . adapter_class_method )
55
55
ActiveRecord ::Base . public_send ( db_config . adapter_class_method )
56
56
else
You can’t perform that action at this time.
0 commit comments