instance method
select_value
Ruby on Rails 8.1.2
Since v2.2.3Signature
select_value(arel, name = nil, binds = [], async: false)
Returns a single value from a record
Parameters
-
arelreq -
nameopt = nil -
bindsopt = [] -
asynckey = false
Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 92
def select_value(arel, name = nil, binds = [], async: false)
select_rows(arel, name, binds, async: async).then { |rows| single_value_from_rows(rows) }
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 92
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements