Class: MySQLAccumulator
- Inherits:
-
Object
- Object
- MySQLAccumulator
- Defined in:
- lib/pqa.rb
Instance Attribute Summary collapse
-
#queries ⇒ Object
readonly
Returns the value of attribute queries.
Instance Method Summary collapse
- #close_out_all ⇒ Object
-
#initialize ⇒ MySQLAccumulator
constructor
A new instance of MySQLAccumulator.
- #new_query_start(line) ⇒ Object
- #query_continuation(line) ⇒ Object
Constructor Details
#initialize ⇒ MySQLAccumulator
Returns a new instance of MySQLAccumulator.
159 160 161 162 |
# File 'lib/pqa.rb', line 159 def initialize @current = nil @queries = [] end |
Instance Attribute Details
#queries ⇒ Object (readonly)
Returns the value of attribute queries.
157 158 159 |
# File 'lib/pqa.rb', line 157 def queries @queries end |
Instance Method Details
#close_out_all ⇒ Object
173 |
# File 'lib/pqa.rb', line 173 def close_out_all ; end |
#new_query_start(line) ⇒ Object
164 165 166 167 |
# File 'lib/pqa.rb', line 164 def new_query_start(line) @queries << @current if !@current.nil? @current = Query.new(line.parse_query_segment) end |
#query_continuation(line) ⇒ Object
169 170 171 |
# File 'lib/pqa.rb', line 169 def query_continuation(line) @current.append(line.parse_query_segment) if !@current.nil? end |