mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fixed merge conflict.
This commit is contained in:
parent
ee6273ff8c
commit
d070baabde
2 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
package uk.ac.ic.wlgitbridge.writelatex.model.db.sql;
|
||||
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.node.FileNode;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.store.FileIndexStore;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query.GetFileNodesForProjectNameSQLQuery;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query.GetProjectNamesSQLQuery;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query.GetURLIndexTableForProjectNameSQLQuery;
|
||||
|
@ -63,8 +64,8 @@ public class SQLiteWLDatabase {
|
|||
return query(new GetVersionIDsForProjectNameSQLQuery(projectName));
|
||||
}
|
||||
|
||||
public List<FileNode> getFileNodesForProjectName(String projectName) throws SQLException {
|
||||
return query(new GetFileNodesForProjectNameSQLQuery(projectName));
|
||||
public List<FileNode> getFileNodesForProjectName(String projectName, FileIndexStore fileIndexStore) throws SQLException {
|
||||
return query(new GetFileNodesForProjectNameSQLQuery(projectName, fileIndexStore));
|
||||
}
|
||||
|
||||
public Map<String, FileNode> getURLIndexTableForProjectName(String projectName) throws SQLException {
|
||||
|
|
|
@ -4,6 +4,7 @@ import uk.ac.ic.wlgitbridge.util.Util;
|
|||
import uk.ac.ic.wlgitbridge.writelatex.filestore.node.AttachmentNode;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.node.BlobNode;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.node.FileNode;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.store.FileIndexStore;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.model.db.sql.SQLQuery;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -21,9 +22,11 @@ public class GetFileNodesForProjectNameSQLQuery implements SQLQuery<List<FileNod
|
|||
"SELECT `file_name`, `changed`, `is_blob`, `blob`, `url` FROM `file_node_table` WHERE `project_name` = ?";
|
||||
|
||||
private final String projectName;
|
||||
private final FileIndexStore fileIndexStore;
|
||||
|
||||
public GetFileNodesForProjectNameSQLQuery(String projectName) {
|
||||
public GetFileNodesForProjectNameSQLQuery(String projectName, FileIndexStore fileIndexStore) {
|
||||
this.projectName = projectName;
|
||||
this.fileIndexStore = fileIndexStore;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,7 +40,7 @@ public class GetFileNodesForProjectNameSQLQuery implements SQLQuery<List<FileNod
|
|||
if (isBlob) {
|
||||
fileNode = new BlobNode(fileName, changed, resultSet.getBytes("blob"));
|
||||
} else {
|
||||
fileNode = new AttachmentNode(fileName, changed, resultSet.getString("url"));
|
||||
fileNode = new AttachmentNode(fileName, changed, resultSet.getString("url"), fileIndexStore);
|
||||
}
|
||||
fileNodes.add(fileNode);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue