Skip to content

Commit

Permalink
Update exec_query references to internal_exec_query to handle connection
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubya committed Oct 30, 2023
1 parent 291162a commit 6e22be2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/arjdbc/sqlite3/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def remove_index(table_name, column_name = nil, **options) # :nodoc:

index_name = index_name_for_remove(table_name, column_name, options)

exec_query "DROP INDEX #{quote_column_name(index_name)}"
internal_exec_query "DROP INDEX #{quote_column_name(index_name)}"
end


Expand All @@ -272,7 +272,7 @@ def remove_index(table_name, column_name = nil, **options) # :nodoc:
def rename_table(table_name, new_name)
schema_cache.clear_data_source_cache!(table_name.to_s)
schema_cache.clear_data_source_cache!(new_name.to_s)
exec_query "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
internal_exec_query "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
rename_table_indexes(table_name, new_name)
end

Expand Down Expand Up @@ -432,7 +432,7 @@ def bind_params_length
end

def table_structure(table_name)
structure = exec_query("PRAGMA table_info(#{quote_table_name(table_name)})", "SCHEMA")
structure = internal_exec_query("PRAGMA table_info(#{quote_table_name(table_name)})", "SCHEMA")
raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty?
table_structure_with_collation(table_name, structure)
end
Expand Down

0 comments on commit 6e22be2

Please sign in to comment.