Package org.apache.derby.tools
Class dblook
java.lang.Object
org.apache.derby.tools.dblook
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
private Connection
private static final int
private static String
private static PreparedStatement
private static final String[]
private static LocalizedResource
private static String
private static String
private static boolean
private static String
private static String
private static boolean
private static String
private static String
private static boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
addSingleQuotes
(String name) private static boolean
atVersion
(Connection conn, int major, int minor) Return true if we are at 10.6 or later.static String
expandDoubleQuotes
(String name) private String
extractDBNameFromUrl
(String dbUrl) private int
extractTableNamesFromList
(String[] args, int start) static String
getColNameFromNumber
(String tableId, int colNum) static String
getColumnListFromDescription
(String tableId, String description) private void
go()
private void
static boolean
isExcludedTable
(String tableName) static boolean
isIgnorableSchema
(String schemaName) private boolean
private int
static String
lookupMessage
(String key) static String
lookupMessage
(String key, String[] vals) static String
lookupSchemaId
(String schemaId) static String
lookupTableId
(String tableId) static void
private boolean
private static boolean
partOfWord
(String str, int pos, int nameLen, int strLen) private void
static String
removeNewlines
(String str) private void
static boolean
static String
stripQuotes
(String quotedName) static String
unExpandDoubleQuotes
(String name) inverse of expandDoubleQuotesstatic void
writeVerboseOutput
(String key, String value)
-
Field Details
-
DB2_MAX_NUMBER_OF_TABLES
private static final int DB2_MAX_NUMBER_OF_TABLES- See Also:
-
conn
-
getColNameFromNumberQuery
-
schemaMap
-
tableIdToNameMap
-
sourceDBUrl
-
ddlFileName
-
stmtDelimiter
-
appendLogs
private static boolean appendLogs -
tableList
-
schemaParam
-
targetSchema
-
skipViews
private static boolean skipViews -
verbose
private static boolean verbose -
sourceDBName
-
lookLogName
-
langUtil
-
sqlAuthorization
private static boolean sqlAuthorization -
ignorableSchemaNames
-
-
Constructor Details
-
dblook
- Throws:
Exception
-
-
Method Details
-
main
-
initState
private void initState() -
parseArgs
-
loadParam
-
loadDriver
private boolean loadDriver() -
extractDBNameFromUrl
-
extractTableNamesFromList
-
showVariables
private void showVariables() -
go
- Throws:
Exception
-
prepForDump
- Throws:
Exception
-
getColumnListFromDescription
public static String getColumnListFromDescription(String tableId, String description) throws SQLException - Throws:
SQLException
-
getColNameFromNumber
- Throws:
SQLException
-
addQuotes
-
addSingleQuotes
-
stripQuotes
-
isExcludedTable
-
isIgnorableSchema
-
stringContainsTargetTable
-
partOfWord
-
expandDoubleQuotes
-
unExpandDoubleQuotes
inverse of expandDoubleQuotes -
lookupSchemaId
-
lookupTableId
-
writeVerboseOutput
-
lookupMessage
-
lookupMessage
-
removeNewlines
-
atVersion
Return true if we are at 10.6 or later.- Throws:
SQLException
-