Skip to content
Snippets Groups Projects
Commit c144b440 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Improved file info query

parent 7128901f
No related branches found
No related tags found
No related merge requests found
Pipeline #1944 passed
......@@ -40,12 +40,11 @@ public class FileDAO {
+ "content_type, content_encoding, content_length, content_md5,\n"
+ "accept_views, provide_views, l.location_type, n.path <> n.relative_path AS virtual_parent,\n"
+ "(SELECT user_name FROM users WHERE user_id = creator_id) AS username,\n"
+ "base_path, os_path\n"
+ "FROM node_path p\n"
+ "JOIN node n ON p.node_id = n.node_id\n"
+ "base_path, get_os_path(n.node_id) AS os_path\n"
+ "FROM node n\n"
+ "JOIN location l ON (n.location_id IS NOT NULL AND n.location_id = l.location_id) OR (n.location_id IS NULL AND l.location_id = ?)\n"
+ "LEFT JOIN storage s ON s.storage_id = l.storage_dest_id\n"
+ "WHERE p.vos_path = ?";
+ "WHERE n.node_id = id_from_vos_path(?)";
FileInfo fileInfo = jdbcTemplate.query(conn -> {
PreparedStatement ps = conn.prepareStatement(sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment