Class: Mysql

Inherits:
Object
  • Object
show all
Defined in:
lib/mysql2/client.rb

Instance Method Summary collapse

Instance Method Details

#async_query(str) ⇒ Object



56
57
58
59
60
61
62
63
64
65
# File 'lib/mysql2/client.rb', line 56

def async_query(str, **)
  check_connection
  @fields = nil
  @protocol.query_command str
  return self
rescue ServerError => e
  @last_error = e
  @sqlstate = e.sqlstate
  raise
end

#async_query_result(**opts) ⇒ Object



67
68
69
70
71
72
73
74
# File 'lib/mysql2/client.rb', line 67

def async_query_result(**opts)
  @protocol.get_result
  store_result(**opts)
rescue ServerError => e
  @last_error = e
  @sqlstate = e.sqlstate
  raise
end