Support bulk create, update and delete
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2k
- Forks
- 238
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
- AbstractClass.create() should support an array of objects. In the case of an array the result should be a single query or database transaction that acts as a bulk insert.
- AbstractClass.destroyAll() should support an optional params argument, mirroring the syntax of AbstractClass.all(). Allows us to write a bulk delete query ("DELETE FROM table WHERE ...") rather than retrieving, iterating over and deleting X number of objects.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Look at the AbstractClass implementation in the ORM's core, likely in lib/abstract-class.js or similar. Examine how create() and destroyAll() currently work, and study the adapter interface for each database (postgres, mysql, etc.) to understand how to implement bulk operations. Check existing tests for these methods to see the expected behavior. Done means the methods handle arrays and optional params correctly, with a single query or transaction per database adapter.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, mongodb, mysql, nodejs, postgresql, redis, sqlite
- Bereich
- backend, database
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100