Permalink
Browse files

removing useless code. [#4988 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 8d95453 commit abd568bf1c48e9082c0be7407eca1155c5fe0599 @tenderlove tenderlove committed with jeremy Jun 27, 2010
Showing with 4 additions and 15 deletions.
  1. +4 −15 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
View
19 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -151,7 +151,7 @@ def quoted_date(value) #:nodoc:
# DATABASE STATEMENTS ======================================
def execute(sql, name = nil) #:nodoc:
- catch_schema_changes { log(sql, name) { @connection.execute(sql) } }
+ log(sql, name) { @connection.execute(sql) }
end
def update_sql(sql, name = nil) #:nodoc:
@@ -176,15 +176,15 @@ def select_rows(sql, name = nil)
end
def begin_db_transaction #:nodoc:
- catch_schema_changes { @connection.transaction }
+ @connection.transaction
end
def commit_db_transaction #:nodoc:
- catch_schema_changes { @connection.commit }
+ @connection.commit
end
def rollback_db_transaction #:nodoc:
- catch_schema_changes { @connection.rollback }
+ @connection.rollback
end
# SCHEMA STATEMENTS ========================================
@@ -391,17 +391,6 @@ def copy_table_contents(from, to, columns, rename = {}) #:nodoc:
end
end
- def catch_schema_changes
- return yield
- rescue ActiveRecord::StatementInvalid => exception
- if exception.message =~ /database schema has changed/
@ncr
ncr Jun 27, 2010

This line reminds me of ODBC times ;) I'm glad it's gone now.

- reconnect!
- retry
- else
- raise
- end
- end
-
def sqlite_version
@sqlite_version ||= SQLiteAdapter::Version.new(select_value('select sqlite_version(*)'))
end

0 comments on commit abd568b

Please sign in to comment.