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
Public Instance methods
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 219 219: def rename_table(name, new_name) 220: move_table(name, new_name) 221: end
Protected Instance methods
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 328 328: def catch_schema_changes 329: return yield 330: rescue ActiveRecord::StatementInvalid => exception 331: if exception.message =~ /database schema has changed/ 332: reconnect! 333: retry 334: else 335: raise 336: end 337: end
[ show source ]
# File vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 257 257: def table_structure(table_name) 258: returning structure = execute("PRAGMA table_info(#{table_name})") do 259: raise ActiveRecord::StatementInvalid if structure.empty? 260: end 261: end