parent
df9bd84c92
commit
f1461b720c
|
@ -16,10 +16,7 @@ trait TimelineQueryLivePhoto
|
|||
$qb->expr()->eq('lp.liveid', 'm.liveid'),
|
||||
))
|
||||
;
|
||||
$result = $qb->executeQuery();
|
||||
$row = $result->fetch();
|
||||
$result->closeCursor();
|
||||
|
||||
return $row;
|
||||
return $qb->executeQuery()->fetch();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,9 +62,7 @@ trait TimelineQueryMap
|
|||
$this->transformMapBoundsFilter($query, false, $bounds, 'c');
|
||||
|
||||
// Execute query
|
||||
$cursor = $this->executeQueryWithCTEs($query);
|
||||
$res = $cursor->fetchAll();
|
||||
$cursor->closeCursor();
|
||||
$res = $this->executeQueryWithCTEs($query)->fetchAll();
|
||||
|
||||
// Post-process results
|
||||
$clusters = [];
|
||||
|
|
|
@ -40,9 +40,7 @@ trait TimelineQuerySingleItem
|
|||
$qb->addSelect('exif');
|
||||
}
|
||||
|
||||
$result = $qb->executeQuery();
|
||||
$row = $result->fetch();
|
||||
$result->closeCursor();
|
||||
$row = $qb->executeQuery()->fetch();
|
||||
|
||||
$utcTs = 0;
|
||||
|
||||
|
|
|
@ -65,10 +65,11 @@ trait TimelineWritePlaces
|
|||
$sql = str_replace('*PREFIX*memories_planet_geometry', 'memories_planet_geometry', $query->getSQL());
|
||||
|
||||
// Run query
|
||||
$result = $this->connection->executeQuery($sql);
|
||||
$rows = $result->fetchAll();
|
||||
$rows = $this->connection->executeQuery($sql)->fetchAll();
|
||||
|
||||
// Insert records in transaction
|
||||
$this->connection->beginTransaction();
|
||||
|
||||
// Insert records
|
||||
foreach ($rows as $row) {
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
$query->insert('memories_places')
|
||||
|
@ -79,5 +80,7 @@ trait TimelineWritePlaces
|
|||
;
|
||||
$query->executeStatement();
|
||||
}
|
||||
|
||||
$this->connection->commit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue