Skip to content

Commit

Permalink
fixing #220
Browse files Browse the repository at this point in the history
requires complex sql, it looks good now but needs more testing
  • Loading branch information
wolfgang-ch committed Aug 23, 2020
1 parent ba965ad commit ea50ce0
Show file tree
Hide file tree
Showing 5 changed files with 276 additions and 215 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2005, 2019 Wolfgang Schramm and Contributors
* Copyright (C) 2005, 2020 Wolfgang Schramm and Contributors
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand All @@ -21,11 +21,11 @@
import java.sql.SQLException;
import java.sql.Statement;

import net.tourbook.common.UI;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;

import net.tourbook.common.UI;

/**
* SQL utilities.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static SQLFilterData getSQL() {
sqlParameters.add(tagId);
}

final String sqlWhere = " AND jTdataTtag.TourTag_tagId IN (" + parameterTagIds.toString() + ") \n"; //$NON-NLS-1$ //$NON-NLS-2$
final String sqlWhere = " AND jTdataTtag.TourTag_tagId IN (" + parameterTagIds.toString() + ")" + UI.NEW_LINE; //$NON-NLS-1$ //$NON-NLS-2$

return new SQLFilterData(sqlWhere, sqlParameters);
}
Expand Down
2 changes: 1 addition & 1 deletion bundles/net.tourbook/src/net/tourbook/ui/SQLFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public SQLFilter(final Set<SQLAppFilter> appFilter) {
*/
if (appFilter.contains(SQLAppFilter.Photo) && TourbookPlugin.getActivePhotoFilter()) {

sb.append(" AND TourData.numberOfPhotos > 0\n"); //$NON-NLS-1$
sb.append(" AND TourData.NumberOfPhotos > 0\n"); //$NON-NLS-1$
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ public abstract class TVITourBookItem extends TreeViewerItem implements ITourIte
// -------- JOINT TABLES, they are added at the end --------------
/////////////////////////////////////////////////////////////////////////

+ "jTdataTtag.TourTag_tagId, "// last+1 //$NON-NLS-1$
+ "Tmarker.markerId "// last+2 //$NON-NLS-1$
+ "jTdataTtag.TourTag_tagId, " // SQL_ALL_OTHER_FIELDS__COLUMN_START_NUMBER + 1 //$NON-NLS-1$
+ "Tmarker.markerId " // SQL_ALL_OTHER_FIELDS__COLUMN_START_NUMBER + 2 //$NON-NLS-1$
;

SQL_SUM_FIELDS = NL
Expand Down

0 comments on commit ea50ce0

Please sign in to comment.