Class: RspecSqlCounter::SqlFetcher::SqlQueryInfo
- Inherits:
-
Struct
- Object
- Struct
- RspecSqlCounter::SqlFetcher::SqlQueryInfo
- Defined in:
- lib/rspec_sql_counter/sql_fetcher.rb
Instance Attribute Summary collapse
-
#sql ⇒ Object
Returns the value of attribute sql.
-
#times ⇒ Object
Returns the value of attribute times.
-
#type_casted_binds ⇒ Object
Returns the value of attribute type_casted_binds.
Instance Method Summary collapse
-
#pretty_to_s ⇒ String
Pretty SqlHelper::SqlQueryInfo.
Instance Attribute Details
#sql ⇒ Object
Returns the value of attribute sql
5 6 7 |
# File 'lib/rspec_sql_counter/sql_fetcher.rb', line 5 def sql @sql end |
#times ⇒ Object
Returns the value of attribute times
5 6 7 |
# File 'lib/rspec_sql_counter/sql_fetcher.rb', line 5 def times @times end |
#type_casted_binds ⇒ Object
Returns the value of attribute type_casted_binds
5 6 7 |
# File 'lib/rspec_sql_counter/sql_fetcher.rb', line 5 def type_casted_binds @type_casted_binds end |
Instance Method Details
#pretty_to_s ⇒ String
Pretty SqlHelper::SqlQueryInfo
9 10 11 12 13 14 15 |
# File 'lib/rspec_sql_counter/sql_fetcher.rb', line 9 def pretty_to_s if type_casted_binds.present? "#{times} times: #{sql} with values #{type_casted_binds}" else "#{times} times: #{sql}" end end |