Class: Avmtrf1::Tools::Runner::Oracle::Query
- Inherits:
-
Object
- Object
- Avmtrf1::Tools::Runner::Oracle::Query
- Defined in:
- lib/avmtrf1/tools/runner/oracle/query.rb
Constant Summary collapse
- DEFAULT_COLUMN_SEPARATOR =
"\t"
- DEFAULT_ROW_SEPARATOR =
"\n"
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
22 23 24 |
# File 'lib/avmtrf1/tools/runner/oracle/query.rb', line 22 def count @count end |
Instance Method Details
#print_body ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/avmtrf1/tools/runner/oracle/query.rb', line 36 def print_body @count = 0 cursor.fetch do |row| print_row(row) @count += 1 end end |
#print_footer ⇒ Object
44 45 46 47 48 |
# File 'lib/avmtrf1/tools/runner/oracle/query.rb', line 44 def return unless parsed.count? print_row(["Count: #{count}"]) end |
#print_header ⇒ Object
30 31 32 33 34 |
# File 'lib/avmtrf1/tools/runner/oracle/query.rb', line 30 def print_header return unless parsed.columns? print_row(cursor..map(&:name)) end |
#run ⇒ Object
24 25 26 27 28 |
# File 'lib/avmtrf1/tools/runner/oracle/query.rb', line 24 def run print_header print_body end |