Created
September 3, 2018 02:55
-
-
Save tbaba/729ac53376486d1c0a8ed5e7541c12d6 to your computer and use it in GitHub Desktop.
establish_connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[4] pry(main)> User.connected? | |
=> false | |
[5] pry(main)> User | |
=> User (call 'User.connection' to establish a connection) | |
[6] pry(main)> User.connection | |
(0.6ms) SET NAMES utf8mb4 COLLATE utf8mb4_bin, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483 | |
=> #<ActiveRecord::ConnectionAdapters::Mysql2Adapter:0x00007fcf4c63beb0 | |
@config= | |
{:adapter=>"mysql2", | |
:encoding=>"utf8mb4", | |
:charset=>"utf8mb4", | |
:collation=>"utf8mb4_bin", | |
:pool=>5, | |
:username=>"root", | |
:password=>nil, | |
:host=>"127.0.0.1", | |
:database=>"crowd_agent_development", | |
:port=>3306, | |
:flags=>2}, | |
@connection= | |
#<Mysql2::Client:0x00007fcf4c640410 | |
@current_query_options= | |
{:as=>:array, | |
:async=>false, | |
:cast_booleans=>false, | |
:symbolize_keys=>false, | |
:database_timezone=>:utc, | |
:application_timezone=>nil, | |
:cache_rows=>true, | |
:connect_flags=>2148540933, | |
:cast=>true, | |
:default_file=>nil, | |
:default_group=>nil, | |
:adapter=>"mysql2", | |
:encoding=>"utf8mb4", | |
:charset=>"utf8mb4", | |
:collation=>"utf8mb4_bin", | |
:pool=>5, | |
:username=>"root", | |
:password=>nil, | |
:host=>"127.0.0.1", | |
:database=>"crowd_agent_development", | |
:port=>3306, | |
:flags=>2}, | |
@query_options= | |
{:as=>:array, | |
:async=>false, | |
[7] pry(main)> User.connected? | |
=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment