Support bulk create, update and delete
- Lingua principale
- JavaScript
- Stelle
- 2k
- Fork
- 238
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
- 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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, mongodb, mysql, nodejs, postgresql, redis, sqlite
- Ambito
- backend, database
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100