Exception: SchemaEvolutionManager::ScriptError
- Inherits:
-
Exception
- Object
- Exception
- SchemaEvolutionManager::ScriptError
- Defined in:
- lib/schema-evolution-manager/script_error.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #dml ⇒ Object
-
#initialize(db, filename) ⇒ ScriptError
constructor
A new instance of ScriptError.
Constructor Details
#initialize(db, filename) ⇒ ScriptError
Returns a new instance of ScriptError.
7 8 9 10 |
# File 'lib/schema-evolution-manager/script_error.rb', line 7 def initialize(db, filename) @db = Preconditions.assert_class(db, Db) @filename = Preconditions.assert_class(filename, String) end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/schema-evolution-manager/script_error.rb', line 5 def filename @filename end |
Instance Method Details
#dml ⇒ Object
12 13 14 15 |
# File 'lib/schema-evolution-manager/script_error.rb', line 12 def dml sql_command = "insert into %s.%s (filename) values ('%s')" % [Db.schema_name, Scripts::SCRIPTS, filename] "psql --command \"%s\" %s" % [sql_command, @db.url] end |