Method: SQLite3::Database#get_first_row

Defined in:
lib/sqlite3/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.



357
358
359
# File 'lib/sqlite3/database.rb', line 357

def get_first_row( sql, *bind_vars )
  execute( sql, *bind_vars ).first
end