Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0000776: Change SqlScriptReader to allow comments in places other tha…
…n the beginning of a line in a sql script 0000775: Change SqlScript to use SqlScriptReader so that statements are streamed
- Loading branch information
Showing
12 changed files
with
222 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
--drop table sym_transform_column; | ||
--drop table sym_transform_table; | ||
--drop table sym_data_gap; | ||
--drop table sym_node_channel_ctl; | ||
--drop table sym_node_group_channel_window; | ||
--drop table sym_data_event; | ||
--drop table sym_trigger_hist; | ||
--drop table sym_trigger_router; | ||
--drop table sym_trigger; | ||
--drop table sym_router; | ||
--drop table sym_node_security; | ||
--drop table sym_node_identity; | ||
--drop table sym_lock; | ||
--drop table sym_node_communication; | ||
--drop table sym_node_host; | ||
--drop table sym_node; | ||
--drop table sym_conflict; | ||
--drop table sym_node_group_link; | ||
--drop table sym_node_group; | ||
--drop table sym_incoming_batch; | ||
--drop table sym_channel; | ||
--drop table sym_outgoing_batch; | ||
--drop table sym_parameter; | ||
--drop table sym_node_host_channel_stats; | ||
--drop table sym_node_host_stats; | ||
--drop table sym_node_host_job_stats; | ||
--drop table sym_registration_redirect; | ||
--drop table sym_registration_request; | ||
--drop table sym_data; | ||
--drop table sym_incoming_error; | ||
--drop table sym_sequence; | ||
--drop table sym_load_filter; | ||
drop table sym_transform_column; | ||
drop table sym_transform_table; | ||
drop table sym_data_gap; | ||
drop table sym_node_channel_ctl; | ||
drop table sym_node_group_channel_window; | ||
drop table sym_data_event; | ||
drop table sym_trigger_hist; | ||
drop table sym_trigger_router; | ||
drop table sym_trigger; | ||
drop table sym_router; | ||
drop table sym_node_security; | ||
drop table sym_node_identity; | ||
drop table sym_lock; | ||
drop table sym_node_communication; | ||
drop table sym_node_host; | ||
drop table sym_node; | ||
drop table sym_conflict; | ||
drop table sym_node_group_link; | ||
drop table sym_node_group; | ||
drop table sym_incoming_batch; | ||
drop table sym_channel; | ||
drop table sym_outgoing_batch; | ||
drop table sym_parameter; | ||
drop table sym_node_host_channel_stats; | ||
drop table sym_node_host_stats; | ||
drop table sym_node_host_job_stats; | ||
drop table sym_registration_redirect; | ||
drop table sym_registration_request; | ||
drop table sym_data; | ||
drop table sym_incoming_error; | ||
drop table sym_sequence; | ||
drop table sym_load_filter; |
6 changes: 6 additions & 0 deletions
6
symmetric-db/src/main/java/org/jumpmind/db/sql/ISqlStatementSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.jumpmind.db.sql; | ||
|
||
public interface ISqlStatementSource { | ||
|
||
public String readSqlStatement(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
symmetric-db/src/main/java/org/jumpmind/db/sql/ListSqlStatementSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.jumpmind.db.sql; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ListSqlStatementSource implements ISqlStatementSource { | ||
|
||
protected List<String> statements; | ||
|
||
public ListSqlStatementSource(String... statements) { | ||
this.statements = new ArrayList<String>(); | ||
for (String sql : statements) { | ||
this.statements.add(sql); | ||
} | ||
} | ||
|
||
public ListSqlStatementSource(List<String> statements) { | ||
this.statements = new ArrayList<String>(statements); | ||
} | ||
|
||
public String readSqlStatement() { | ||
return statements.size() > 0 ? statements.remove(0) : null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.