7 declare(strict_types=1);
21 'started_searchable' => [
22 'uuid' =>
'bulk-uuid-searchable-6',
24 'description' =>
'Bulk Description',
25 'operation_count' => 3,
26 'start_time' =>
'2009-10-10 00:00:00',
32 'bulk_uuid' =>
'bulk-uuid-searchable-6',
33 'topic_name' =>
'topic-5',
34 'serialized_data' => json_encode([
'entity_id' => 5]),
35 'status' => OperationInterface::STATUS_TYPE_COMPLETE,
37 'result_message' =>
null,
40 'bulk_uuid' =>
'bulk-uuid-searchable-6',
41 'topic_name' =>
'topic-5',
42 'serialized_data' => json_encode([
'entity_id' => 5,
'meta_information' =>
'Test']),
43 'status' => OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED,
45 'result_message' =>
'Something went wrong during your request',
48 'bulk_uuid' =>
'bulk-uuid-searchable-6',
49 'topic_name' =>
'topic-5',
50 'serialized_data' => json_encode([
'entity_id' => 5]),
51 'status' => OperationInterface::STATUS_TYPE_RETRIABLY_FAILED,
53 'result_message' =>
'Entity with ID=4 does not exist',
58 $bulkQuery =
"INSERT INTO {$bulkTable} (`uuid`, `user_id`, `description`, `operation_count`, `start_time`)" 59 .
" VALUES (:uuid, :user_id, :description, :operation_count, :start_time);";
60 foreach (
$bulks as $bulk) {
65 .
" (`bulk_uuid`, `topic_name`, `serialized_data`, `status`, `error_code`, `result_message`)" 66 .
" VALUES (:bulk_uuid, :topic_name, :serialized_data, :status, :error_code, :result_message);";
foreach($bulks as $bulk) $operationQuery