instance method
fetch_primary_keys
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
fetch_primary_keys(tables)
No documentation comment.
Parameters
-
tablesreq
Source
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 542
def fetch_primary_keys(tables)
structures = table_structures(tables)
tables.index_with do |table|
_, structure = structure_for(structures, table)
pks = structure.select { |f| f["pk"] > 0 }
pks.sort_by { |f| f["pk"] }.map { |f| f["name"] }
end
end
Defined in activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb line 542
· View on GitHub
· Improve this page
· Find usages on GitHub