Comments (1)
@diogomaximo if using Postgres and activerecord-import 0.8.0+ you can do
result = Entry.import entries
ids = result.ids
Issue #247 would provide the same functionality to MySQL and SQLite once implemented.
Otherwise you could possibly make a work around by setting the created_at
timestamp or some import identifier and querying by that to get the records with their ids from the database.
from activerecord-import.
Related Issues (20)
- Handle conflict targets differently HOT 2
- About track_validation_failures and import methods HOT 5
- QUESTION: Difference between ActiveRecord-Import & upsert_all in Rails 7? HOT 2
- activerecord-import with public_activity no found HOT 1
- mysql_adapter.rb:29:in `+': String can't be coerced into Integer (TypeError) HOT 9
- Anchor links in README doesn't take you to correct location in the readme for on_duplicate_key_ignore and on_duplicate_key_update
- Delegating values with default for generation in database. HOT 7
- Support returning `ids` for mysql too HOT 1
- ActiveRecord::Base.default_timezone Deprecation Warnings in Rails 7.0 HOT 1
- Import with synchronize docs issue
- How can I use import to do upsert in a model that has 2 unique indexes? HOT 1
- Proposal: `.import` should accept array-like objects
- Upcoming breakage with next Rails release HOT 8
- RuntimeError: Hstore value should be a hash HOT 3
- Inconsistent enum behavior
- Inserted Primary IDs not sequential HOT 2
- why import do not return imported ids, when it called in sidekiq worker ? HOT 6
- Allow import of ignored columns - Suggested Feature HOT 1
- Empty ON CONFLICT targets HOT 1
- Question about performance: What are the order of things? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activerecord-import.