Exception: ActiveRecord::SQLWarning
- Inherits:
-
AdapterError
- Object
- StandardError
- ActiveRecordError
- AdapterError
- ActiveRecord::SQLWarning
- Defined in:
- lib/active_record/errors.rb
Overview
Raised when a statement produces an SQL warning.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#sql ⇒ Object
Returns the value of attribute sql.
Attributes inherited from AdapterError
Instance Method Summary collapse
-
#initialize(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil) ⇒ SQLWarning
constructor
A new instance of SQLWarning.
Constructor Details
#initialize(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil) ⇒ SQLWarning
Returns a new instance of SQLWarning.
288 289 290 291 292 293 |
# File 'lib/active_record/errors.rb', line 288 def initialize( = nil, code = nil, level = nil, sql = nil, connection_pool = nil) super(, connection_pool: connection_pool) @code = code @level = level @sql = sql end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
285 286 287 |
# File 'lib/active_record/errors.rb', line 285 def code @code end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
285 286 287 |
# File 'lib/active_record/errors.rb', line 285 def level @level end |
#sql ⇒ Object
Returns the value of attribute sql.
286 287 288 |
# File 'lib/active_record/errors.rb', line 286 def sql @sql end |