move function batch_insert from script batch_insert to user_function db_batch_insert