instance method select_value

Ruby on Rails 5.0.7.2

Since v4.2.11.3 Last seen in v5.0.7.2

Available in: v4.2.11.3 v5.0.7.2

Signature

select_value(arel, name = nil, binds = [])

No documentation comment.

Parameters

arel req
name opt = nil
binds opt = []
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 10
        def select_value(arel, name = nil, binds = [])
          arel, binds = binds_from_relation arel, binds
          sql = to_sql(arel, binds)
          execute_and_clear(sql, name, binds) do |result|
            result.getvalue(0, 0) if result.ntuples > 0 && result.nfields > 0
          end
        end

Defined in activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb line 10 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close