protected function _importRecords($fixtureClassName, TableSchema $schema, Connection $connection)
    {
        $fixture = new $fixtureClassName;
        if (!isset($fixture->records) || empty($fixture->records)) {
            return true;
        }

        $fixture->records = (array)$fixture->records;
        if (count($fixture->records) > 100) {
            $chunk = array_chunk($fixture->records, 100);
        } else {
            $chunk = [0 => $fixture->records];
        }

        foreach ($chunk as $records) {
            list($fields, $values, $types) = $this->_getRecords($records, $schema);
            $query = $connection->newQuery()
                ->insert($fields, $types)
                ->into($schema->name());

            foreach ($values as $row) {
                $query->values($row);
            }

            try {
                $statement = $query->execute();
                $statement->closeCursor();
            } catch (\Exception $ex) {
                $this->error(__d('installer', 'Error while importing data for table "{0}". Details: {1}', $schema->name(), $ex->getMessage()));

                return false;
            }
        }

        return true;
    }