Package io.ultreia.java4all.util.sql
Class SqlScriptWriter
- java.lang.Object
-
- io.ultreia.java4all.util.sql.SqlScriptWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SqlScriptWriter extends Object implements Closeable
Created by tchemit on 05/05/2018.- Since:
- 1.1.0
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlScriptWriter.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SqlScriptWriter.Builderbuilder(OutputStream target)static SqlScriptWriter.Builderbuilder(Path target)voidclose()voidflush()longgetStatementCount()static SqlScriptWriterof(OutputStream target)static SqlScriptWriterof(Path target)voidwriteScript(SqlScriptReader sqlScripReader)voidwriteScript(Path sqlScriptFile)voidwriteSql(String sql)
-
-
-
Method Detail
-
of
public static SqlScriptWriter of(Path target)
-
of
public static SqlScriptWriter of(OutputStream target)
-
builder
public static SqlScriptWriter.Builder builder(Path target)
-
builder
public static SqlScriptWriter.Builder builder(OutputStream target)
-
writeSql
public void writeSql(String sql)
-
getStatementCount
public long getStatementCount()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
flush
public void flush() throws IOException- Throws:
IOException
-
writeScript
public void writeScript(Path sqlScriptFile) throws IOException
- Throws:
IOException
-
writeScript
public void writeScript(SqlScriptReader sqlScripReader) throws IOException
- Throws:
IOException
-
-