Ejemplo n.º 1
0
 protected function buildEventQuery(BaseEvent $event)
 {
     $q = 'MERGE (user:User {id: {user_id}})
     ON CREATE SET user.login = {user_login}
     MERGE (event:GithubEvent {id: {event_id}})
     ON CREATE SET event.time = {event_time}, event.user_id = {user_id}, event:' . $event->getEventType();
     $p = ['user_id' => $event->getActor()->getId(), 'user_login' => $event->getActor()->getLogin(), 'event_id' => $event->getEventId(), 'event_time' => $event->getCreatedTime()->getTimestamp() * 1000];
     return ['query' => $q, 'params' => $p];
 }