Class StudioDBScriptRunnerImpl
java.lang.Object
org.craftercms.studio.impl.v2.dal.StudioDBScriptRunnerImpl
- All Implemented Interfaces:
StudioDBScriptRunner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Connection
protected DataSource
protected int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StudioDBScriptRunnerImpl
(DataSource dataSource, int scriptLinesBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
Execute the given SQL script file.protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.craftercms.studio.api.v2.dal.StudioDBScriptRunner
execute
-
Field Details
-
dataSource
-
scriptLinesBufferSize
protected int scriptLinesBufferSize -
connection
-
autoCommit
protected boolean autoCommit
-
-
Constructor Details
-
StudioDBScriptRunnerImpl
-
-
Method Details
-
openConnection
protected void openConnection() -
closeConnection
protected void closeConnection() -
execute
Description copied from interface:StudioDBScriptRunner
Execute the given SQL script file.- Specified by:
execute
in interfaceStudioDBScriptRunner
- Parameters:
sqlScriptPath
- Path to the SQL script file to executesendFullFile
- if true, the whole script will be sent to the DB, otherwise it will be partitioned into chunks- Throws:
SQLException
- if an error occurs while executing the scriptIOException
- if an error occurs while reading the script file
-