db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: rev 53903 - in incubator/derby/code/trunk/java/tools/org/apache/derby: loc tools
Date Wed, 06 Oct 2004 20:29:57 GMT
Author: bandaram
Date: Wed Oct  6 13:29:56 2004
New Revision: 53903

Modified:
   incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
   incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java
Log:
Commit Jalud's dblook argument handling fix

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties	(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties	Wed
Oct  6 13:29:56 2004
@@ -181,7 +181,7 @@
 \ USAGE:\n\ java org.apache.derby.tools.dblook -d <sourceDBUrl> [OPTIONS]\n\n\
 \ \twhere the source URL is the full URL, including the connection protocol\n\
 \ \tand any connection attributes that might apply.  For example, use\n\
-\ \t'jdbc:cloudscape:myDB', or 'jdbc:cloudscape:net://localhost:1527/myDB:user=usr;'. \n\n\
+\ \t'jdbc:derby:myDB', or 'jdbc:derby:net://localhost:1527/myDB:user=usr;'. \n\n\
 \ \toptions include: \n\n\
 \ \t-z <schemaName> to specify a schema to which the DDL generation\n\
 \ \t should be limited.  Only database objects with that schema will have\n\
@@ -199,19 +199,29 @@
 \ \t will be written.\n\
 \ \t\tIf not specified, default is the console.\
 \ \n
-CSLOOK_FileCreation=This file was created using Cloudscape's cslook utility.
+CSLOOK_FileCreation=This file was created using Derby's dblook utility.
 CSLOOK_OutputLocation=Output will be sent to file {0}\n
 CSLOOK_Timestamp=Timestamp: {0}
 CSLOOK_DBName=Source database is: {0}
 CSLOOK_DBUrl=Connection URL is: {0}
-CSLOOK_TargetTables=The cslook utility will consider only specified tables.
+CSLOOK_TargetTables=The dblook utility will consider only specified tables.
 CSLOOK_TargetSchema=Specified schema is: {0}
 # Directory com/ibm/db2j/tools/cslookImpl/...
-CSLOOK_Header=DDL Statements for {0}
+CSLOOK_TablesHeader=DDL Statements for tables
+CSLOOK_ChecksHeader=DDL Statements for checks
+CSLOOK_IndexesHeader=DDL Statements for indexes
+CSLOOK_JarsHeader=DDL Statements for jars
+CSLOOK_KeysHeader=DDL Statements for keys
+CSLOOK_PrimUniqueHeader=primary/unique
+CSLOOK_ForeignHeader=foreign
+CSLOOK_SchemasHeader=DDL Statements for schemas
+CSLOOK_StoredProcHeader=DDL Statements for stored procedures
+CSLOOK_TriggersHeader=DDL Statements for triggers
+CSLOOK_ViewsHeader=DDL Statements for views
 CSLOOK_Jar_Note=\
 **** NOTE **** In order for jar files to be loaded correctly,\n\
 -- you must either 1) ensure that the CSJARS directory (created\n\
--- automatically by cslook) exists where it was created (i.e. at\n\
+-- automatically by dblook) exists where it was created (i.e. at\n\
 -- the path shown in the statements below), or else 2) change the\n\
 -- path in the statements below to reflect the current location of\n\
 -- CSJARS.  If the CSJARS directory does not exist, or if it\n\
@@ -222,6 +232,6 @@
 CSLOOK_DefaultSchema=Reverting back to default schema 'APP'
 CSLOOK_AtLeastOneDebug=\
 -- Note: At least one unexpected error/warning message was\n\
--- encountered during DDL generation.  See cslook.log\n\
+-- encountered during DDL generation.  See dblook.log\n\
 -- to review the message(s).\n\
 \n

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java	(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java	Wed Oct  6 13:29:56
2004
@@ -231,16 +231,20 @@
 			case 'd':
 				if (!haveVal)
 					return -1;
-				if (args[start].length() == 2)
-					sourceDBUrl = args[++start];
-				return start;
+				if (args[start].length() == 2) {
+					sourceDBUrl = stripQuotes(args[++start]);
+					return start;
+				}
+				return -1;
 
 			case 'z':
 				if (!haveVal)
 					return -1;
-				if (args[start].length() == 2)
+				if (args[start].length() == 2) {
 					schemaParam = args[++start];
-				return start;
+					return start;
+				}
+				return -1;
 
 			case 't':
 				if (!haveVal)
@@ -256,9 +260,11 @@
 			case 'o':
 				if (!haveVal)
 					return -1;
-				if ((args[start].length() == 2) && (args[start+1].length() > 0))
+				if ((args[start].length() == 2) && (args[start+1].length() > 0)){
 					ddlFileName = args[++start];
-				return start;
+					return start;
+				}
+				return -1;
 
 			case 'a':
 				if (args[start].equals("-append")) {
@@ -342,9 +348,9 @@
 		start = dbUrl.indexOf("net://");
 		if (start == -1)
 		// standard url (jdbc:derby:<dbname>).  Database
-		// name starts right after "cloudscape:".  The "11" in
-		// the following line is the length of "cloudscape:".
-			start = dbUrl.indexOf("cloudscape:") + 11;
+		// name starts right after "derby:".  The "6" in
+		// the following line is the length of "derby:".
+			start = dbUrl.indexOf("derby:") + 6;
 		else
 		// Network Server url.  Database name starts right
 		// after next slash (":net://hostname:port/<dbname>).

Mime
View raw message