public abstract class SqlPlugin extends FingerprintPlugin
| Constructor and Description | 
|---|
SqlPlugin()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected static void | 
disableSegmentAttributes(Connection conn)
Disable outputting the segment attributes in the DDL. 
 | 
protected static void | 
endCDATA(ContentHandler out)
End a CDATA section in the XML stream. 
 | 
protected static CallableStatement | 
getCallableStatement(Connection conn,
                    String sql)
Gets a CallableStatement for the specified SQL. 
 | 
protected static PreparedStatement | 
getPreparedStatement(Connection conn,
                    String sql)
Gets a PreparedStatement for the specified SQL. 
 | 
protected static String | 
getSchemaName(Connection conn)
Returns the schema name for the given connection. 
 | 
protected static void | 
newLine(ContentHandler out)  | 
protected static String | 
normalizeSpace(String str)
Replaces all sequences of whitespace with a single space. 
 | 
protected static String | 
replace(String str,
       String pattern,
       String repl)
Replaces a regex pattern in a given string. 
 | 
protected static String | 
replaceInDDL(String str,
            String schema)
Replaces non-fixed strings in a DDL statement. 
 | 
protected static String | 
replaceQuotedSchemaName(String str,
                       String schema)
Replaces quoted schema name in the given string with a fixed string. 
 | 
protected static String | 
replaceSchemaNameInDDL(String str,
                      String schema)
Replaces the schema name in the given string with a fixed string. 
 | 
protected static String | 
replaceTableOrViewName(String name)
Replaces non-fixed strings in a table or view name. 
 | 
protected static void | 
resetSegmentAttributes(Connection conn)
Resets the changes made by calling  
disableSegmentAttributes(java.sql.Connection) | 
protected static void | 
startCDATA(ContentHandler out)
Start a CDATA section in the XML stream. 
 | 
execute, getConfiguration, getConfiguration, getName, setConfigurationprotected static String getSchemaName(Connection conn) throws SQLException
conn - the JDBC connectionSQLException - if the operation failsprotected static void disableSegmentAttributes(Connection conn) throws IfsException, SQLException
conn - the JDBC connectionIfsException - if the operation failsSQLException - if the operation failsprotected static void resetSegmentAttributes(Connection conn) throws IfsException, SQLException
disableSegmentAttributes(java.sql.Connection)conn - the JDBC connectionIfsException - if the operation failsSQLException - if the operation failsprotected static String replaceQuotedSchemaName(String str, String schema)
str - the string to replace the pattern inschema - the schema nameprotected static String replaceSchemaNameInDDL(String str, String schema)
str - the string to replace the pattern inschema - the schema nameprotected static String replaceTableOrViewName(String name)
name - the table of view nameprotected static String replaceInDDL(String str, String schema)
str - the DDLschema - the schema nameprotected static String normalizeSpace(String str)
str - the string to replace whitespace inprotected static String replace(String str, String pattern, String repl)
str - the string to replace the pattern inpattern - the regex patternrepl - the replacement stringprotected static void startCDATA(ContentHandler out) throws SAXException
out - the output streamSAXException - if the operation failsprotected static void endCDATA(ContentHandler out) throws SAXException
out - the output streamSAXException - if the operation failsprotected static void newLine(ContentHandler out) throws SAXException
SAXExceptionprotected static PreparedStatement getPreparedStatement(Connection conn, String sql) throws IfsException
If a PreparedStatement was previously created for the SQL, it is returned. Otherwise a new PreparedStatement is created and returned.
The caller should not close the returned PreparedStatement.
conn - the JDBC connectionsql - the SQLIfsException - if the operation failsprotected static CallableStatement getCallableStatement(Connection conn, String sql) throws IfsException
If a CallableStatement was previously created for the SQL, it is returned. Otherwise a new CallableStatement is created and returned.
The caller should not close the returned CallableStatement.
conn - the JDBC connectionsql - the SQLIfsException - if the operation failsCopyright © 2025. All rights reserved.