Method: SQLite::Database#get_first_row
- Defined in:
- lib/sqlite/database.rb
#get_first_row(sql, *bind_vars) ⇒ Object
A convenience method for obtaining the first row of a result set, and discarding all others. It is otherwise identical to #execute.
See also #get_first_value.
265 266 267 268 |
# File 'lib/sqlite/database.rb', line 265 def get_first_row( sql, *bind_vars ) execute( sql, *bind_vars ) { |row| return row } nil end |