Package org.jdbi.v3.core.statement
Class Script
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable<Script>
Represents a number of SQL statements delimited by semicolon which will be executed in order in a batch statement.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdbi.v3.core.statement.BaseStatement
BaseStatement.StatementCustomizerInvocation -
Field Summary
Fields inherited from class org.jdbi.v3.core.statement.SqlStatement
stmtFields inherited from class org.jdbi.v3.core.statement.BaseStatement
typedThis -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddStatement(String statement, List<String> statements) int[]execute()Execute this script in a batch statementvoidExecute this script as a set of separate statementsLocate the Script and split it into statements.splitToStatements(String script) Methods inherited from class org.jdbi.v3.core.statement.SqlStatement
afterExecution, beforeBinding, beforeExecution, beforeTemplating, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindArray, bindASCIIStream, bindASCIIStream, bindBean, bindBean, bindBeanList, bindBinaryStream, bindBinaryStream, bindBySqlType, bindBySqlType, bindByType, bindByType, bindByType, bindByType, bindByType, bindByType, bindFields, bindFields, bindList, bindList, bindList, bindList, bindList, bindList, bindList, bindMap, bindMethods, bindMethods, bindMethodsList, bindNamedArgumentFinder, bindNamedArgumentFinder, bindNull, bindNull, bindNVarchar, bindNVarchar, bindPojo, bindPojo, bindPojo, bindPojo, bindPojo, bindPojo, cleanupHandleCommit, cleanupHandleRollback, cleanupStatement, createStatement, defineList, defineList, defineNamedBindings, getBinding, getSql, internalExecute, mapperForType, mapperForType, mapperForType, parseSql, setQueryTimeout, toStringMethods inherited from class org.jdbi.v3.core.statement.BaseStatement
addCustomizers, attachToHandleForCleanup, callCustomizers, cleanUpForException, close, equals, getConfig, getContext, getHandle, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.config.Configurable
addCustomizer, configure, define, getConfig, registerArgument, registerArgument, registerArrayType, registerArrayType, registerArrayType, registerArrayType, registerCodecFactory, registerCollector, registerCollector, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerColumnMapper, registerExtension, registerRowMapper, registerRowMapper, registerRowMapper, registerRowMapper, setMapKeyColumn, setMapValueColumn, setSqlArrayArgumentStrategy, setSqlLogger, setSqlParser, setTemplateEngine, setTimingCollector
-
Constructor Details
-
Script
-
Script
Backwards compatible constructor that takes an explicit string argument.- See Also:
-
-
Method Details
-
execute
public int[] execute()Execute this script in a batch statement- Returns:
- an array of ints which are the results of each statement in the script
-
executeAsSeparateStatements
public void executeAsSeparateStatements()Execute this script as a set of separate statements -
getStatements
Locate the Script and split it into statements.- Returns:
- the split statements
-
splitToStatements
-
addStatement
-