'SQLite has a compile-time default (SQLITE_LIMIT_VARIABLE_NUMBER) of
999 variables per query.
If there is just single field to insert, then we can hit another
limit, SQLITE_MAX_COMPOUND_SELECT which defaults to 500.'

def bulk_batch_size(self, fields, objs):

    limit = (999 if (len(fields) > 1) else 500)
    return ((limit // len(fields)) if (len(fields) > 0) else len(objs))
