Class: ActiveRecord::ConnectionAdapters::DeprecatedSQLiteAdapter

Inherits:
SQLite2Adapter show all
Defined in:
lib/active_record/connection_adapters/sqlite_adapter.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from SQLite2Adapter

#add_column, #execute, #rename_table, #rewrite_count_distinct_queries

Methods inherited from SQLiteAdapter

#adapter_name, #add_column, #add_lock!, #begin_db_transaction, #change_column, #change_column_default, #columns, #commit_db_transaction, #delete, #execute, #indexes, #native_database_types, #primary_key, #quote_column_name, #quote_string, #remove_column, #remove_index, #rename_column, #rename_table, #requires_reloading?, #rollback_db_transaction, #select_all, #select_one, #supports_count_distinct?, #supports_migrations?, #tables, #update

Methods inherited from AbstractAdapter

#clear_query_cache

Instance Method Details

#insert(sql, name = nil, pk = nil, id_value = nil) ⇒ Object



401
402
403
404
# File 'lib/active_record/connection_adapters/sqlite_adapter.rb', line 401

def insert(sql, name = nil, pk = nil, id_value = nil)
  execute(sql, name = nil)
  id_value || @connection.last_insert_rowid
end