Class: QueryConsole::SqlValidator::ValidationResult
- Inherits:
-
Object
- Object
- QueryConsole::SqlValidator::ValidationResult
- Defined in:
- app/services/query_console/sql_validator.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#is_dml ⇒ Object
readonly
Returns the value of attribute is_dml.
-
#sanitized_sql ⇒ Object
readonly
Returns the value of attribute sanitized_sql.
-
#valid ⇒ Object
readonly
Returns the value of attribute valid.
Instance Method Summary collapse
- #dml? ⇒ Boolean
-
#initialize(valid:, sanitized_sql: nil, error: nil, is_dml: false) ⇒ ValidationResult
constructor
A new instance of ValidationResult.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize(valid:, sanitized_sql: nil, error: nil, is_dml: false) ⇒ ValidationResult
Returns a new instance of ValidationResult.
6 7 8 9 10 11 |
# File 'app/services/query_console/sql_validator.rb', line 6 def initialize(valid:, sanitized_sql: nil, error: nil, is_dml: false) @valid = valid @sanitized_sql = sanitized_sql @error = error @is_dml = is_dml end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'app/services/query_console/sql_validator.rb', line 4 def error @error end |
#is_dml ⇒ Object (readonly)
Returns the value of attribute is_dml.
4 5 6 |
# File 'app/services/query_console/sql_validator.rb', line 4 def is_dml @is_dml end |
#sanitized_sql ⇒ Object (readonly)
Returns the value of attribute sanitized_sql.
4 5 6 |
# File 'app/services/query_console/sql_validator.rb', line 4 def sanitized_sql @sanitized_sql end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
4 5 6 |
# File 'app/services/query_console/sql_validator.rb', line 4 def valid @valid end |
Instance Method Details
#dml? ⇒ Boolean
21 22 23 |
# File 'app/services/query_console/sql_validator.rb', line 21 def dml? @is_dml end |
#invalid? ⇒ Boolean
17 18 19 |
# File 'app/services/query_console/sql_validator.rb', line 17 def invalid? !@valid end |
#valid? ⇒ Boolean
13 14 15 |
# File 'app/services/query_console/sql_validator.rb', line 13 def valid? @valid end |