Public Member Functions | |
DropRequest (String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator, DatabaseSchema schema, int granularity, boolean isCaseSensitive) throws SQLException | |
DropRequest (String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator) | |
void | parse (DatabaseSchema schema, int granularity, boolean isCaseSensitive) throws SQLException |
void | cloneParsing (AbstractRequest request) |
boolean | isInsert () |
boolean | isUpdate () |
boolean | isDelete () |
boolean | isCreate () |
boolean | isDrop () |
void | debug () |
boolean | isAlter () |
DropRequest
is an SQL request with the following syntax:
DROP TABLE table-name
Definition at line 44 of file DropRequest.java.
|
Creates a new If the syntax is incorrect an exception is thrown.
Definition at line 65 of file DropRequest.java. References org.objectweb.cjdbc.common.sql.DropRequest.parse(). 00068 { 00069 this(sqlQuery, escapeProcessing, timeout, lineSeparator); 00070 parse(schema, granularity, isCaseSensitive); 00071 }
|
|
Creates a new The request is not parsed but it can be done later by a call to parse(DatabaseSchema, int, boolean).
Definition at line 88 of file DropRequest.java. 00090 { 00091 super(sqlQuery, escapeProcessing, timeout, lineSeparator); 00092 cacheable = RequestType.UNCACHEABLE; 00093 isParsed = false; 00094 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 137 of file DropRequest.java. References org.objectweb.cjdbc.common.sql.AbstractWriteRequest.cloneTableNameAndColumns(), and org.objectweb.cjdbc.common.sql.AbstractRequest.isParsed. 00138 { 00139 if (!request.isParsed()) 00140 return; 00141 cloneTableNameAndColumns((AbstractWriteRequest) request); 00142 isParsed = true; 00143 }
|
|
Displays some debugging information about this request. Reimplemented from org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 193 of file DropRequest.java. 00194 { 00195 super.debug(); 00196 if (tableName != null) 00197 System.out.println("Dropped table '" + tableName + "'"); 00198 else 00199 System.out.println("No information about dropped table"); 00200 00201 System.out.println(); 00202 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 206 of file DropRequest.java. 00207 { 00208 return false; 00209 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 176 of file DropRequest.java. 00177 { 00178 return false; 00179 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 167 of file DropRequest.java. 00168 { 00169 return false; 00170 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 185 of file DropRequest.java. 00186 { 00187 return true; 00188 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 149 of file DropRequest.java. 00150 { 00151 return false; 00152 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractWriteRequest. Definition at line 158 of file DropRequest.java. 00159 { 00160 return false; 00161 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 100 of file DropRequest.java. References org.objectweb.cjdbc.common.sql.schema.DatabaseTable.getName(). Referenced by org.objectweb.cjdbc.common.sql.DropRequest.DropRequest(). 00102 { 00103 if (granularity == ParsingGranularities.NO_PARSING) 00104 { 00105 isParsed = true; 00106 return; 00107 } 00108 00109 String originalSQL = this.trimCarriageReturn(); 00110 String dropTable = originalSQL.toLowerCase(); 00111 00112 // Strip 'drop (temporary) table ' 00113 int tableIdx = dropTable.indexOf("table"); 00114 if (isCaseSensitive) 00115 dropTable = originalSQL.substring(tableIdx + 5).trim(); 00116 else 00117 dropTable = dropTable.substring(tableIdx + 5).trim(); 00118 00119 if (schema == null) 00120 tableName = dropTable; 00121 else 00122 { 00123 // Get the table on which DROP occurs 00124 DatabaseTable t = schema.getTable(dropTable, isCaseSensitive); 00125 if (t == null) 00126 throw new SQLException("Unknown table '" + dropTable 00127 + "' in this DROP statement '" + sqlQuery + "'"); 00128 else 00129 tableName = t.getName(); 00130 } 00131 isParsed = true; 00132 }
|