Lines 174-180
Link Here
|
174 |
* @since Ant 1.6 |
174 |
* @since Ant 1.6 |
175 |
*/ |
175 |
*/ |
176 |
private boolean escapeProcessing = true; |
176 |
private boolean escapeProcessing = true; |
177 |
|
177 |
|
|
|
178 |
/** |
179 |
* User may chose the line comment characters |
180 |
* |
181 |
* @since Ant 1.7 |
182 |
*/ |
183 |
private String commentChars = null; |
184 |
|
178 |
/** |
185 |
/** |
179 |
* Set the name of the SQL file to be run. |
186 |
* Set the name of the SQL file to be run. |
180 |
* Required unless statements are enclosed in the build file |
187 |
* Required unless statements are enclosed in the build file |
Lines 313-318
Link Here
|
313 |
public void setEscapeProcessing(boolean enable) { |
320 |
public void setEscapeProcessing(boolean enable) { |
314 |
escapeProcessing = enable; |
321 |
escapeProcessing = enable; |
315 |
} |
322 |
} |
|
|
323 |
/** |
324 |
* Set line comment chars |
325 |
* @param chars the string the user desires to comment out a line of SQL |
326 |
* @since Ant 1.7 |
327 |
*/ |
328 |
public void setCommentChars(String chars) { |
329 |
commentChars = chars; |
330 |
} |
316 |
|
331 |
|
317 |
/** |
332 |
/** |
318 |
* Load the sql file and then execute it |
333 |
* Load the sql file and then execute it |
Lines 451-466
Link Here
|
451 |
} |
466 |
} |
452 |
line = getProject().replaceProperties(line); |
467 |
line = getProject().replaceProperties(line); |
453 |
if (!keepformat) { |
468 |
if (!keepformat) { |
454 |
if (line.startsWith("//")) { |
469 |
if (commentChars == null) { |
455 |
continue; |
470 |
if (line.startsWith("//")) { |
456 |
} |
471 |
continue; |
457 |
if (line.startsWith("--")) { |
472 |
} |
458 |
continue; |
473 |
if (line.startsWith("--")) { |
|
|
474 |
continue; |
475 |
} |
476 |
StringTokenizer st = new StringTokenizer(line); |
477 |
if (st.hasMoreTokens()) { |
478 |
String token = st.nextToken(); |
479 |
if ("REM".equalsIgnoreCase(token)) { |
480 |
continue; |
481 |
} |
482 |
} |
459 |
} |
483 |
} |
460 |
StringTokenizer st = new StringTokenizer(line); |
484 |
else{ |
461 |
if (st.hasMoreTokens()) { |
485 |
if (line.startsWith(commentChars)) { |
462 |
String token = st.nextToken(); |
|
|
463 |
if ("REM".equalsIgnoreCase(token)) { |
464 |
continue; |
486 |
continue; |
465 |
} |
487 |
} |
466 |
} |
488 |
} |