import com.quantum.Messages;
import com.quantum.QuantumPlugin;
+import com.quantum.model.Bookmark;
import com.quantum.sql.MultiSQLServer;
import com.quantum.sql.SQLResults;
*/
public class ViewHelper {
- public static SQLResults tryGetResults(IViewPart view, Connection con, String query) {
- return tryGetResults(view.getSite().getShell(), con, query);
+ /** @deprecated */
+ public static SQLResults tryGetResults(IViewPart view, Bookmark bookmark, Connection con, String query) {
+ return tryGetResults(view.getSite().getShell(), bookmark, con, query);
}
- public static SQLResults tryGetResults(Shell shell, Connection con, String query) {
- SQLResults results = null;
- MultiSQLServer server = MultiSQLServer.getInstance();
+ /** @deprecated */
+ public static SQLResults tryGetResults(Shell shell, Bookmark bookmark, Connection con, String query) {
try {
- results = server.execute(con, query);
+ MultiSQLServer server = MultiSQLServer.getInstance();
+ return server.execute(bookmark, con, query);
} catch (SQLException e) {
LogProxy log = LogProxy.getInstance();
log.addText(LogProxy.ERROR, e.getLocalizedMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$
- results = new SQLResults();
- results.setIsError(true);
MessageDialog.openConfirm(shell, "Database returned error", e.getLocalizedMessage()); //$NON-NLS-1$
+ return null;
}
- return results;
}
public static FileOutputStream askSaveFile(String key, Shell shell) {