## Issue `frappe.db.bulk_insert` is not working as expected: - It will not insert any row if there are less than 3 values - It will not add 1st row at all. e.g if I'm adding 5 values, it will only add 4. - It will add values one by one after 2 values, instead it should have inserted items (in db) in chunk of 10000 (as per the code written before). ## Changes Made - Solved above issues - use better way to chunk list - Added Postgres support for bulk_insert API And now `bulk_insert` will only do **1 db call for each 10000** values. Note: For testing purpose I made `Test Bulk Insert` doctype and keep chunk size of 100. ## Before  ## After  nodocs |
||
|---|---|---|
| .. | ||
| mariadb | ||
| postgres | ||
| __init__.py | ||
| database.py | ||
| db_manager.py | ||
| query.py | ||
| schema.py | ||
| sequence.py | ||