@be-dmitry a single record is formatted as an associative array: [ 'name' => 'john', 'lname' => 'doe' ]. A batch of records is a group (numerically indexed array) of records: e.g. [  ['name' => 'john', 'lname' => 'doe' ] , ['name' => 'john2', 'lname' => 'doe2' ] ]. You can call batch insert with one or more records. In the case where batch insert was invoked with one record ( an associative array), line 225 then makes sure its formatted in batch format ( numerically indexed).. see line 229