/** * Constructor * * @param db2Sql * Object that contains methods for retrieving SQL that works for each DB2 platform */ public ViewSourceTab(String hint, String stmtSep, DB2Sql db2Sql) { super(hint); super.setCompressWhitespace(true); super.setupFormatter(stmtSep, null); this.db2Sql = db2Sql; }
/** * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab#createStatement() */ @Override protected PreparedStatement createStatement() throws SQLException { final ISession session = getSession(); ISQLConnection conn = session.getSQLConnection(); String sqlStatement = getSqlStatement(); String[] bindValues = getBindValues(); if (s_log.isDebugEnabled()) { s_log.debug("Running SQL for index source tab: " + sqlStatement); s_log.debug("With the following bind variable values: "); int parameterIndex = 1; for (String bindValue : bindValues) { s_log.debug("[" + (parameterIndex++) + "] => '" + bindValue + "'"); } } PreparedStatement pstmt = conn.prepareStatement(sqlStatement); int parameterIndex = 1; for (String bindValue : bindValues) { pstmt.setString(parameterIndex++, bindValue); } return pstmt; }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip */ public MysqlProcedureSourceTab(String hint) { super(hint); super.setCompressWhitespace(false); }
/** * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab#createSourcePanel() */ @Override protected BaseSourcePanel createSourcePanel() { return new FormattedSourcePanel(getSession()); } }
/** * This method simply returns a String array containing the schema name and the selected object's simple * name, in that order. If the SQL returned from getSqlStatement must specify a different order, or for * example uses that catalog of the object, instead of or in addition to schema, then this method must be * overridden to return the necessary bind variable values, in the order required by the SQL statement. * * @return a String array of bind variable values */ protected String[] getBindValues() { final IDatabaseObjectInfo doi = getDatabaseObjectInfo(); return new String[] { doi.getSchemaName(), doi.getSimpleName() }; }
buf.append(statementSeparator); String processedResult = processResult(buf); if (formatter != null && buf.length() != 0)
/** * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab#createStatement() */ @Override protected PreparedStatement createStatement() throws SQLException { final ISession session = getSession(); ISQLConnection conn = session.getSQLConnection(); String sqlStatement = getSqlStatement(); String[] bindValues = getBindValues(); if (s_log.isDebugEnabled()) { s_log.debug("Running SQL for index source tab: " + sqlStatement); s_log.debug("With the following bind variable values: "); int parameterIndex = 1; for (String bindValue : bindValues) { s_log.debug("[" + (parameterIndex++) + "] => '" + bindValue + "'"); } } PreparedStatement pstmt = conn.prepareStatement(sqlStatement); int parameterIndex = 1; for (String bindValue : bindValues) { pstmt.setString(parameterIndex++, bindValue); } return pstmt; }
/** * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab#createSourcePanel() */ @Override protected BaseSourcePanel createSourcePanel() { return new FormattedSourcePanel(getSession()); } }
/** * This method simply returns a String array containing the schema name and the selected object's simple * name, in that order. If the SQL returned from getSqlStatement must specify a different order, or for * example uses that catalog of the object, instead of or in addition to schema, then this method must be * overridden to return the necessary bind variable values, in the order required by the SQL statement. * * @return a String array of bind variable values */ protected String[] getBindValues() { final IDatabaseObjectInfo doi = getDatabaseObjectInfo(); return new String[] { doi.getSchemaName(), doi.getSimpleName() }; }
buf.append(statementSeparator); String processedResult = processResult(buf); if (formatter != null && buf.length() != 0)
public MysqlViewSourceTab(String hint, String stmtSep) { super(hint); super.setupFormatter(stmtSep, null); super.setCompressWhitespace(true); }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param stmtSep * the string to use to separate SQL statements */ public TriggerSourceTab(String hint, String stmtSep) { super(hint); super.setCompressWhitespace(true); super.setupFormatter(stmtSep, null); }
public MysqlTriggerSourceTab(String hint, String stmtSep) { super(hint); super.setupFormatter(stmtSep, null); super.setCompressWhitespace(true); }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param db2Sql * Object that contains methods for retrieving SQL that works for each DB2 platform */ public ProcedureSourceTab(String hint, String stmtSep, DB2Sql db2Sql) { super(hint); super.setCompressWhitespace(false); super.setupFormatter(stmtSep, null); this.db2Sql = db2Sql; }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param stmtSep * the string to use to separate SQL statements */ public ViewSourceTab(String hint, String stmtSep) { super(hint); super.setCompressWhitespace(false); super.setupFormatter(stmtSep, null); }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param stmtSep * the string to use to separate SQL statements * @param db2Sql * Object that contains methods for retrieving SQL that works for each DB2 platform */ public TableSourceTab(String hint, String stmtSep, DB2Sql db2Sql) { super(hint); super.setCompressWhitespace(true); super.setupFormatter(stmtSep, null); this.db2Sql = db2Sql; }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param stmtSep * the string to use to separate SQL statements * @param db2Sql * Object that contains methods for retrieving SQL that works for each DB2 platform */ public UDFSourceTab(String hint, String stmtSep, DB2Sql db2Sql ) { super(hint); super.setCompressWhitespace(true); super.setupFormatter(stmtSep, null); this.db2Sql = db2Sql; }
/** * Constructor * * @param hint * what the user sees on mouse-over tool-tip * @param stmtSep * the character that separates SQL statements * @param db2Sql * Object that contains methods for retrieving SQL that works for each DB2 platform */ public TriggerSourceTab(String hint, String stmtSep, DB2Sql db2Sql) { super(hint); super.setCompressWhitespace(true); super.setupFormatter(stmtSep, null); this.db2Sql = db2Sql; }