- All Implemented Interfaces:
- Iterable<String>
public class SqlFileReader
extends Object
implements Iterable<String>
Create an iterable on a SQL text content. The content is iterated on each SQL
statement. For information the class handles semi-colon in quote.
File example:
INSERT INTO client (prenom, age) VALUES ('John', 11);
INSERT INTO client (prenom, age) VALUES ('Jack', 12);
Then:
SqlFileReader reader = new SqlFileReader(stream);
for (String sql : reader) {
// process sql variable
}
- Author:
- jruchaud