Top Inners Fields Constructors Methods
liquibase.statement

public abstract Class ExecutablePreparedStatementBase

extends Object
implements ExecutablePreparedStatement
Class Inheritance
All Implemented Interfaces
liquibase.statement.ExecutablePreparedStatement, liquibase.statement.SqlStatement
Known Direct Subclasses
liquibase.statement.InsertExecutablePreparedStatement, liquibase.statement.UpdateExecutablePreparedStatement, liquibase.statement.BatchDmlExecutablePreparedStatement
Imports
liquibase.Scope, liquibase.change.ColumnConfig, liquibase.change.core.LoadDataChange, liquibase.changelog.ChangeSet, liquibase.database.Database, .PreparedStatementFactory, liquibase.database.core.PostgresDatabase, .SQLiteDatabase, liquibase.datatype.DataTypeFactory, .LiquibaseDataType, liquibase.exception.DatabaseException, .LiquibaseException, .UnexpectedLiquibaseException, liquibase.listener.SqlListener, liquibase.logging.Logger, liquibase.resource.ResourceAccessor, liquibase.snapshot.SnapshotGeneratorFactory, liquibase.sql.SqlConfiguration, liquibase.sql.visitor.SqlVisitor, liquibase.structure.core.Column, .Table, liquibase.util.FilenameUtil, .JdbcUtil, .StreamUtil, java.io.*, java.lang.reflect.InvocationTargetException, .Method, java.math.BigDecimal, .BigInteger, java.sql.*, java.util.*, java.util.logging.Level

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
private final String
private final ChangeSet
private final Set<Closeable>
private final List<? extends ColumnConfig>
protected static ResourceBundle
protected Database
private static Method
private static PreparedStatement
private static String
private final ResourceAccessor
private final String
private final Map<String, Object>
private final String

Constructor Summary

AccessConstructor and Description
protected
ExecutablePreparedStatementBase(Database database, String catalogName, String schemaName, String tableName, List<? extends ColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor)

Method Summary

Modifier and TypeMethod and Description
protected void
applyColumnParameter(PreparedStatement
the PreparedStatement whose parameter is to be set
stmt
,
int
the parameter index (first bind variable is 1)
i
,
ColumnConfig
a ColumnConfig with information about the column, its type, and the desired value
col
)

Sets a single bind variable for a statement to its designated value

protected String
applyVisitors(String sql, List<SqlVisitor> sqlVisitors)

protected void
attachParams(List<? extends ColumnConfig>
a list of columns with their designated values
cols
,
PreparedStatement
the PreparedStatement to which the values are to be attached
stmt
)

Sets the list of bind variables for the execution of a DML statement

protected static InputStream
public void
execute(PreparedStatementFactory
a factory for creating a PreparedStatement object.
factory
)

Implements liquibase.statement.ExecutablePreparedStatement.execute.

Executes the prepared statement created by the given factory.

protected void
protected abstract String
protected PreparedStatement
public String
public ChangeSet
public List<? extends ColumnConfig>
protected long
protected long
private String
getFileName(String fileName)

public ResourceAccessor
protected InputStream
public String
private Object
public String
private Object
public boolean
protected ExecutablePreparedStatementBase.LOBContent<InputStream>
toBinaryStream(String valueLobFile)

protected ExecutablePreparedStatementBase.LOBContent<Reader>
toCharacterStream(String valueLobFile, String encoding)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

catalogNameback to summary
private final String catalogName
changeSetback to summary
private final ChangeSet changeSet
closeablesback to summary
private final Set<Closeable> closeables
columnsback to summary
private final List<? extends ColumnConfig> columns
coreBundleback to summary
protected static ResourceBundle coreBundle
databaseback to summary
protected Database database
executeWithFlagsMethodback to summary
private static Method executeWithFlagsMethod
lastPreparedStatementback to summary
private static PreparedStatement lastPreparedStatement
lastPreparedStatementSqlback to summary
private static String lastPreparedStatementSql
resourceAccessorback to summary
private final ResourceAccessor resourceAccessor
schemaNameback to summary
private final String schemaName
snapshotScratchPadback to summary
private final Map<String, Object> snapshotScratchPad
tableNameback to summary
private final String tableName

Constructor Detail

ExecutablePreparedStatementBaseback to summary
protected ExecutablePreparedStatementBase(Database database, String catalogName, String schemaName, String tableName, List<? extends ColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor)

Method Detail

applyColumnParameterback to summary
protected void applyColumnParameter(PreparedStatement stmt, int i, ColumnConfig col) throws SQLException, DatabaseException

Sets a single bind variable for a statement to its designated value

Parameters
stmt:PreparedStatement

the PreparedStatement whose parameter is to be set

i:int

the parameter index (first bind variable is 1)

col:ColumnConfig

a ColumnConfig with information about the column, its type, and the desired value

Annotations
@SuppressWarnings:squid:S3776
Exceptions
SQLException:
if JDBC objects to a setting (non-existent bind number, wrong column type etc.)
DatabaseException:
if an I/O error occurs during the read of LOB values
applyVisitorsback to summary
protected String applyVisitors(String sql, List<SqlVisitor> sqlVisitors)
attachParamsback to summary
protected void attachParams(List<? extends ColumnConfig> cols, PreparedStatement stmt) throws SQLException, DatabaseException

Sets the list of bind variables for the execution of a DML statement

Parameters
cols:List<? extends ColumnConfig>

a list of columns with their designated values

stmt:PreparedStatement

the PreparedStatement to which the values are to be attached

Exceptions
SQLException:
if JDBC objects to a setting (non-existent bind number, wrong column type etc.)
DatabaseException:
if an I/O error occurs during the read of LOB values
createStreamback to summary
protected static InputStream createStream(InputStream in)
executeback to summary
public void execute(PreparedStatementFactory factory) throws DatabaseException

Implements liquibase.statement.ExecutablePreparedStatement.execute.

Doc from liquibase.statement.ExecutablePreparedStatement.execute.

Executes the prepared statement created by the given factory.

Parameters
factory:PreparedStatementFactory

a factory for creating a PreparedStatement object.

Annotations
@Override
Exceptions
DatabaseException:
if an exception occurs while executing the prepared statement.
executePreparedStatementback to summary
protected void executePreparedStatement(PreparedStatement stmt) throws SQLException
generateSqlback to summary
protected abstract String generateSql(List<ColumnConfig> cols)
getCachedStatementback to summary
protected PreparedStatement getCachedStatement(String sql)
getCatalogNameback to summary
public String getCatalogName()
getChangeSetback to summary
public ChangeSet getChangeSet()
getColumnsback to summary
public List<? extends ColumnConfig> getColumns()
getContentLengthback to summary
protected long getContentLength(InputStream in) throws IOException
getContentLengthback to summary
protected long getContentLength(Reader reader) throws IOException
getFileNameback to summary
private String getFileName(String fileName)
getResourceAccessorback to summary
public ResourceAccessor getResourceAccessor()
getResourceAsStreamback to summary
protected InputStream getResourceAsStream(String valueLobFile) throws IOException
Annotations
@SuppressWarnings:squid:S2095
getSchemaNameback to summary
public String getSchemaName()
getScratchDataback to summary
private Object getScratchData(String key)
getTableNameback to summary
public String getTableName()
setScratchDataback to summary
private Object setScratchData(String key, Object data)
skipOnUnsupportedback to summary
public boolean skipOnUnsupported()

Implements liquibase.statement.SqlStatement.skipOnUnsupported.

Annotations
@Override
toBinaryStreamback to summary
protected ExecutablePreparedStatementBase.LOBContent<InputStream> toBinaryStream(String valueLobFile) throws LiquibaseException, IOException
Annotations
@SuppressWarnings:java:S2583
toCharacterStreamback to summary
protected ExecutablePreparedStatementBase.LOBContent<Reader> toCharacterStream(String valueLobFile, String encoding) throws IOException, LiquibaseException
Annotations
@SuppressWarnings:java:S2583
liquibase.statement back to summary

protected Class ExecutablePreparedStatementBase.LOBContent<T>

extends Object
Class Inheritance
  • java.lang.Object
  • liquibase.statement.ExecutablePreparedStatementBase.LOBContent

Field Summary

Modifier and TypeField and Description
private final T
private final long

Constructor Summary

AccessConstructor and Description
public
LOBContent(T content, long length)

Method Summary

Modifier and TypeMethod and Description
public T
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private final T content
lengthback to summary
private final long length

Constructor Detail

LOBContentback to summary
public LOBContent(T content, long length)

Method Detail

getContentback to summary
public T getContent()
getLengthback to summary
public long getLength()