Skip to content

Commit a5c8d58

Browse files
committed
Get rid of unused Sqlite3Adapter#use_insert_returning?
It was introduced in rails#49290 likely to do the same as PostgresqlAdapter, but it's not used anywhere and there not really any reason to have that option. Postgres has it because INSERT RETURNING can't be used in some corner cases, see: rails#5698
1 parent e7e2587 commit a5c8d58

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ def initialize(...)
127127
results_as_hash: true,
128128
default_transaction_mode: :immediate,
129129
)
130-
@use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true
131130
end
132131

133132
def database_exists?
@@ -434,10 +433,6 @@ def shared_cache? # :nodoc:
434433
@config.fetch(:flags, 0).anybits?(::SQLite3::Constants::Open::SHAREDCACHE)
435434
end
436435

437-
def use_insert_returning?
438-
@use_insert_returning
439-
end
440-
441436
def get_database_version # :nodoc:
442437
SQLite3Adapter::Version.new(query_value("SELECT sqlite_version(*)", "SCHEMA"))
443438
end

0 commit comments

Comments
 (0)