Method: Mysql::Protocol#query_command
- Defined in:
- lib/vendor/mysql/protocol.rb
#query_command(query) ⇒ Object
Query command
Argument
- query
- String
-
query string
Return
- Integer / nil
-
number of fields of results. nil if no results.
210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/vendor/mysql/protocol.rb', line 210 def query_command(query) check_state :READY begin reset write [COM_QUERY, @charset.convert(query)].pack("Ca*") get_result rescue set_state :READY raise end end |