public function move($source, $destination)
    {
        // I don't know a way to write this all in a single sql query that's
        // also compatible across db engines, so we're letting PHP do all the
        // updates. Much slower, but it should still be pretty fast in most
        // cases.
        $select = $this->pdo->prepare('SELECT id, path FROM '.$this->tableName.'  WHERE path = ? OR path LIKE ?');
        $select->execute([$source, $source.'/%']);

        $update = $this->pdo->prepare('UPDATE '.$this->tableName.' SET path = ? WHERE id = ?');
        while ($row = $select->fetch(\PDO::FETCH_ASSOC)) {
            // Sanity check. SQL may select too many records, such as records
            // with different cases.
            if ($row['path'] !== $source && 0 !== strpos($row['path'], $source.'/')) {
                continue;
            }

            $trailingPart = substr($row['path'], strlen($source) + 1);
            $newPath = $destination;
            if ($trailingPart) {
                $newPath .= '/'.$trailingPart;
            }
            $update->execute([$newPath, $row['id']]);
        }
    }