Class: Migr8::DBMS::SQLite3
Defined Under Namespace
Classes: Skeleton
Constant Summary collapse
- SYMBOL =
'sqlite3'
- PATTERN =
/\bsqlite3\b/
Instance Attribute Summary
Attributes inherited from Base
#command, #history_table, #sqltmpfile
Instance Method Summary collapse
- #execute_sql(sql, cmdopt = nil) ⇒ Object
- #get_migrations ⇒ Object
- #history_table_exist? ⇒ Boolean
- #run_sql(sql, opts = {}) ⇒ Object
Methods inherited from Base
#apply_migrations, #create_history_table, detect_by_command, #fetch_column_value_of, inherited, #initialize, #new_skeleton, #q, #unapply_migrations
Constructor Details
This class inherits a constructor from Migr8::DBMS::Base
Instance Method Details
#execute_sql(sql, cmdopt = nil) ⇒ Object
855 856 857 858 |
# File 'lib/migr8.rb', line 855 def execute_sql(sql, cmdopt=nil) preamble = ".bail ON\n" return super(preamble+sql, cmdopt) end |
#get_migrations ⇒ Object
892 893 894 895 |
# File 'lib/migr8.rb', line 892 def get_migrations() migrations = _get_migrations("-list", /\|/) return migrations end |
#history_table_exist? ⇒ Boolean
886 887 888 889 890 |
# File 'lib/migr8.rb', line 886 def history_table_exist? table = history_table() output = execute_sql(".table #{table}") return output.include?(table) end |
#run_sql(sql, opts = {}) ⇒ Object
860 861 862 863 |
# File 'lib/migr8.rb', line 860 def run_sql(sql, opts={}) preamble = ".bail ON\n" super(preamble+sql, opts) end |