Class: Vcs4sql::Sqlite::Applied
- Inherits:
-
Object
- Object
- Vcs4sql::Sqlite::Applied
- Defined in:
- lib/vcs4sql/sqlite/applied.rb
Overview
The applied (existing) database change log.
Instance Method Summary collapse
-
#absent(version) ⇒ Object
Ensure that applied change set has a change with particular version.
-
#change(version) ⇒ Object
Returns the details about applied change by version.
- #empty? ⇒ Boolean
-
#initialize(conn, sql: "select * from changelog order by version") ⇒ Applied
constructor
A new instance of Applied.
Constructor Details
#initialize(conn, sql: "select * from changelog order by version") ⇒ Applied
Returns a new instance of Applied.
31 32 33 34 |
# File 'lib/vcs4sql/sqlite/applied.rb', line 31 def initialize(conn, sql: "select * from changelog order by version") @conn = conn @sql = sql end |
Instance Method Details
#absent(version) ⇒ Object
Ensure that applied change set has a change with particular version
41 42 43 |
# File 'lib/vcs4sql/sqlite/applied.rb', line 41 def absent(version) change(version).nil? end |
#change(version) ⇒ Object
TODO:
#/DEV Add verification of array usage over index. The changelog shouldn’t be a null.
Returns the details about applied change by version
49 50 51 |
# File 'lib/vcs4sql/sqlite/applied.rb', line 49 def change(version) changelog[version] end |
#empty? ⇒ Boolean
36 37 38 |
# File 'lib/vcs4sql/sqlite/applied.rb', line 36 def empty? changelog.empty? end |