The SQLite adapter works with both the 2.x and 3.x series of SQLite with the sqlite-ruby drivers (available both as gems and from rubyforge.org/projects/sqlite-ruby/).
Options:
-
:database
-- Path to the database file.
Methods
Instance Public methods
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 233 def rename_table(name, new_name) execute "ALTER TABLE #{name} RENAME TO #{new_name}" end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 105 def requires_reloading? true end
Instance Protected methods
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 345 def catch_schema_changes return yield rescue ActiveRecord::StatementInvalid => exception if exception.message =~ %rdatabase schema has changed/ reconnect! retry else raise end end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 272 def table_structure(table_name) returning structure = execute("PRAGMA table_info(#{table_name})") do raise ActiveRecord::StatementInvalid if structure.empty? end end