org.apache.derby.tools
Class dblook
java.lang.Object
org.apache.derby.tools.dblook
public final class dblook
- extends java.lang.Object
Constructor Summary |
dblook(java.lang.String[] args)
|
Method Summary |
static java.lang.String |
addQuotes(java.lang.String name)
|
static java.lang.String |
addSingleQuotes(java.lang.String name)
|
private static boolean |
atVersion(java.sql.Connection conn,
int major,
int minor)
Return true if we are at 10.6 or later. |
static java.lang.String |
expandDoubleQuotes(java.lang.String name)
|
private java.lang.String |
extractDBNameFromUrl(java.lang.String dbUrl)
|
private int |
extractTableNamesFromList(java.lang.String[] args,
int start)
|
static java.lang.String |
getColNameFromNumber(java.lang.String tableId,
int colNum)
|
static java.lang.String |
getColumnListFromDescription(java.lang.String tableId,
java.lang.String description)
|
private void |
go()
|
private void |
initState()
|
static boolean |
isExcludedTable(java.lang.String tableName)
|
static boolean |
isIgnorableSchema(java.lang.String schemaName)
|
private boolean |
loadDriver()
|
private int |
loadParam(java.lang.String[] args,
int start)
|
static java.lang.String |
lookupMessage(java.lang.String key)
|
static java.lang.String |
lookupMessage(java.lang.String key,
java.lang.String[] vals)
|
static java.lang.String |
lookupSchemaId(java.lang.String schemaId)
|
static java.lang.String |
lookupTableId(java.lang.String tableId)
|
static void |
main(java.lang.String[] args)
|
private boolean |
parseArgs(java.lang.String[] args)
|
private static boolean |
partOfWord(java.lang.String str,
int pos,
int nameLen,
int strLen)
|
private void |
prepForDump()
|
static java.lang.String |
removeNewlines(java.lang.String str)
|
private void |
showVariables()
|
static boolean |
stringContainsTargetTable(java.lang.String str)
|
static java.lang.String |
stripQuotes(java.lang.String quotedName)
|
static void |
writeVerboseOutput(java.lang.String key,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DB2_MAX_NUMBER_OF_TABLES
private static final int DB2_MAX_NUMBER_OF_TABLES
- See Also:
- Constant Field Values
conn
private java.sql.Connection conn
getColNameFromNumberQuery
private static java.sql.PreparedStatement getColNameFromNumberQuery
schemaMap
private static java.util.HashMap schemaMap
tableIdToNameMap
private static java.util.HashMap tableIdToNameMap
sourceDBUrl
private static java.lang.String sourceDBUrl
ddlFileName
private static java.lang.String ddlFileName
stmtDelimiter
private static java.lang.String stmtDelimiter
appendLogs
private static boolean appendLogs
tableList
private static java.util.ArrayList tableList
schemaParam
private static java.lang.String schemaParam
targetSchema
private static java.lang.String targetSchema
skipViews
private static boolean skipViews
verbose
private static boolean verbose
sourceDBName
private static java.lang.String sourceDBName
lookLogName
private static java.lang.String lookLogName
langUtil
private static LocalizedResource langUtil
sqlAuthorization
private static boolean sqlAuthorization
ignorableSchemaNames
private static final java.lang.String[] ignorableSchemaNames
dblook
public dblook(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
initState
private void initState()
parseArgs
private boolean parseArgs(java.lang.String[] args)
loadParam
private int loadParam(java.lang.String[] args,
int start)
loadDriver
private boolean loadDriver()
extractDBNameFromUrl
private java.lang.String extractDBNameFromUrl(java.lang.String dbUrl)
extractTableNamesFromList
private int extractTableNamesFromList(java.lang.String[] args,
int start)
showVariables
private void showVariables()
go
private void go()
throws java.lang.Exception
- Throws:
java.lang.Exception
prepForDump
private void prepForDump()
throws java.lang.Exception
- Throws:
java.lang.Exception
getColumnListFromDescription
public static java.lang.String getColumnListFromDescription(java.lang.String tableId,
java.lang.String description)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getColNameFromNumber
public static java.lang.String getColNameFromNumber(java.lang.String tableId,
int colNum)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
addQuotes
public static java.lang.String addQuotes(java.lang.String name)
addSingleQuotes
public static java.lang.String addSingleQuotes(java.lang.String name)
stripQuotes
public static java.lang.String stripQuotes(java.lang.String quotedName)
isExcludedTable
public static boolean isExcludedTable(java.lang.String tableName)
isIgnorableSchema
public static boolean isIgnorableSchema(java.lang.String schemaName)
stringContainsTargetTable
public static boolean stringContainsTargetTable(java.lang.String str)
partOfWord
private static boolean partOfWord(java.lang.String str,
int pos,
int nameLen,
int strLen)
expandDoubleQuotes
public static java.lang.String expandDoubleQuotes(java.lang.String name)
lookupSchemaId
public static java.lang.String lookupSchemaId(java.lang.String schemaId)
lookupTableId
public static java.lang.String lookupTableId(java.lang.String tableId)
writeVerboseOutput
public static void writeVerboseOutput(java.lang.String key,
java.lang.String value)
lookupMessage
public static java.lang.String lookupMessage(java.lang.String key)
lookupMessage
public static java.lang.String lookupMessage(java.lang.String key,
java.lang.String[] vals)
removeNewlines
public static java.lang.String removeNewlines(java.lang.String str)
atVersion
private static boolean atVersion(java.sql.Connection conn,
int major,
int minor)
throws java.sql.SQLException
- Return true if we are at 10.6 or later.
- Throws:
java.sql.SQLException
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.