Class: Remnant::Database::Query
- Inherits:
-
Object
- Object
- Remnant::Database::Query
- Defined in:
- lib/remnant/database/query.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#sql ⇒ Object
readonly
Returns the value of attribute sql.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(sql, time, backtrace = []) ⇒ Query
constructor
A new instance of Query.
- #inspectable? ⇒ Boolean
Constructor Details
#initialize(sql, time, backtrace = []) ⇒ Query
Returns a new instance of Query.
8 9 10 11 12 |
# File 'lib/remnant/database/query.rb', line 8 def initialize(sql, time, backtrace = []) @sql = sql @time = time @backtrace = backtrace end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
6 7 8 |
# File 'lib/remnant/database/query.rb', line 6 def backtrace @backtrace end |
#sql ⇒ Object (readonly)
Returns the value of attribute sql.
4 5 6 |
# File 'lib/remnant/database/query.rb', line 4 def sql @sql end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
5 6 7 |
# File 'lib/remnant/database/query.rb', line 5 def time @time end |
Instance Method Details
#inspectable? ⇒ Boolean
14 15 16 |
# File 'lib/remnant/database/query.rb', line 14 def inspectable? sql.strip =~ /^SELECT /i end |