|
|
|
@ -364,16 +364,16 @@ class CustomPropertiesBackend implements BackendInterface { |
|
|
|
|
private function cacheDirectory(string $path, Directory $node): void { |
|
|
|
|
$prefix = ltrim($path . '/', '/'); |
|
|
|
|
$query = $this->connection->getQueryBuilder(); |
|
|
|
|
$query->select('name', 'propertypath', 'propertyname', 'propertyvalue', 'valuetype') |
|
|
|
|
$query->select('name', 'p.propertypath', 'p.propertyname', 'p.propertyvalue', 'p.valuetype') |
|
|
|
|
->from('filecache', 'f') |
|
|
|
|
->leftJoin('f', 'properties', 'p', $query->expr()->andX( |
|
|
|
|
$query->expr()->eq('propertypath', $query->func()->concat( |
|
|
|
|
$query->createNamedParameter($prefix), |
|
|
|
|
'name' |
|
|
|
|
)), |
|
|
|
|
$query->expr()->eq('userid', $query->createNamedParameter($this->user->getUID())) |
|
|
|
|
)) |
|
|
|
|
->where($query->expr()->eq('parent', $query->createNamedParameter($node->getInternalFileId(), IQueryBuilder::PARAM_INT))); |
|
|
|
|
->hintShardKey('storage', $node->getNode()->getMountPoint()->getNumericStorageId()) |
|
|
|
|
->leftJoin('f', 'properties', 'p', $query->expr()->eq('p.propertypath', $query->func()->concat( |
|
|
|
|
$query->createNamedParameter($prefix), |
|
|
|
|
'f.name' |
|
|
|
|
)), |
|
|
|
|
) |
|
|
|
|
->where($query->expr()->eq('parent', $query->createNamedParameter($node->getInternalFileId(), IQueryBuilder::PARAM_INT))) |
|
|
|
|
->andWhere($query->expr()->eq('p.userid', $query->createNamedParameter($this->user->getUID()))); |
|
|
|
|
$result = $query->executeQuery(); |
|
|
|
|
|
|
|
|
|
$propsByPath = []; |
|
|
|
|