Class SqlFileReader
java.lang.Object
org.nuiton.util.sql.SqlFileReader
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUse to create an iterator on the iterable. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
source
-
-
Constructor Details
-
SqlFileReader
-
SqlFileReader
-
-
Method Details
-
iterator
-