class ThinkingSphinx::Connection::MRI
Attributes
options[R]
Public Instance Methods
base_error()
click to toggle source
# File lib/thinking_sphinx/connection/mri.rb, line 4 def base_error Mysql2::Error end
Private Instance Methods
client()
click to toggle source
# File lib/thinking_sphinx/connection/mri.rb, line 12 def client @client ||= Mysql2::Client.new({ :flags => Mysql2::Client::MULTI_STATEMENTS, :connect_timeout => 5 }.merge(options)) rescue base_error => error raise ThinkingSphinx::SphinxError.new_from_mysql error end
results_for(statements)
click to toggle source
# File lib/thinking_sphinx/connection/mri.rb, line 21 def results_for(statements) results = [client.query(statements)] results << client.store_result while client.next_result results end