equal
deleted
inserted
replaced
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ |
17 */ |
18 package info.globalcode.sql.dk; |
18 package info.globalcode.sql.dk; |
19 |
19 |
20 import info.globalcode.sql.dk.batch.Batch; |
20 import info.globalcode.sql.dk.batch.Batch; |
|
21 import info.globalcode.sql.dk.batch.BatchException; |
21 import info.globalcode.sql.dk.configuration.DatabaseDefinition; |
22 import info.globalcode.sql.dk.configuration.DatabaseDefinition; |
22 import info.globalcode.sql.dk.configuration.Properties; |
23 import info.globalcode.sql.dk.configuration.Properties; |
23 import info.globalcode.sql.dk.configuration.Property; |
24 import info.globalcode.sql.dk.configuration.Property; |
24 import info.globalcode.sql.dk.formatting.ColumnsHeader; |
25 import info.globalcode.sql.dk.formatting.ColumnsHeader; |
25 import info.globalcode.sql.dk.formatting.Formatter; |
26 import info.globalcode.sql.dk.formatting.Formatter; |
73 formatter.writeEndStatement(); |
74 formatter.writeEndStatement(); |
74 formatter.writeEndDatabase(); |
75 formatter.writeEndDatabase(); |
75 formatter.writeEndBatch(); |
76 formatter.writeEndBatch(); |
76 } |
77 } |
77 |
78 |
78 public void executeBatch(Batch batch, Formatter formatter) throws SQLException { |
79 public void executeBatch(Batch batch, Formatter formatter) throws SQLException, BatchException { |
79 formatter.writeStartBatch(); |
80 formatter.writeStartBatch(); |
80 formatter.writeStartDatabase(databaseDefinition); |
81 formatter.writeStartDatabase(databaseDefinition); |
81 while (batch.hasNext()) { |
82 while (batch.hasNext()) { |
82 SQLCommand sqlCommand = batch.next(); |
83 SQLCommand sqlCommand = batch.next(); |
83 formatter.writeStartStatement(); |
84 formatter.writeStartStatement(); |