instance method
show_variable
Ruby on Rails 4.2.11.3
Since v3.2.22.5Signature
show_variable(name)
SHOW VARIABLES LIKE ‘name’
Parameters
-
namereq
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 620
def show_variable(name)
variables = select_all("select @@#{name} as 'Value'", 'SCHEMA')
variables.first['Value'] unless variables.empty?
rescue ActiveRecord::StatementInvalid
nil
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 620
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter