public abstract class ExecutablePreparedStatementBase extends Object implements ExecutablePreparedStatement
Modifier and Type | Class and Description |
---|---|
protected static class |
ExecutablePreparedStatementBase.LOBContent<T> |
Modifier and Type | Field and Description |
---|---|
protected static ResourceBundle |
coreBundle |
protected Database |
database |
EMPTY_SQL_STATEMENT
Modifier | Constructor and Description |
---|---|
protected |
ExecutablePreparedStatementBase(Database database,
String catalogName,
String schemaName,
String tableName,
List<? extends ColumnConfig> columns,
ChangeSet changeSet,
ResourceAccessor resourceAccessor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnError
protected static ResourceBundle coreBundle
protected Database database
protected ExecutablePreparedStatementBase(Database database, String catalogName, String schemaName, String tableName, List<? extends ColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor)
protected static InputStream createStream(InputStream in)
public void execute(PreparedStatementFactory factory) throws DatabaseException
ExecutablePreparedStatement
execute
in interface ExecutablePreparedStatement
factory
- for creating a PreparedStatement
objectDatabaseException
protected PreparedStatement getCachedStatement(String sql)
protected void executePreparedStatement(PreparedStatement stmt) throws SQLException
SQLException
protected void attachParams(List<? extends ColumnConfig> cols, PreparedStatement stmt) throws SQLException, DatabaseException
cols
- a list of columns with their designated valuesstmt
- the PreparedStatement to which the values are to be attachedSQLException
- 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 valuesprotected abstract String generateSql(List<ColumnConfig> cols)
protected void applyColumnParameter(PreparedStatement stmt, int i, ColumnConfig col) throws SQLException, DatabaseException
stmt
- the PreparedStatement whose parameter is to be seti
- the parameter index (first bind variable is 1)col
- a ColumnConfig with information about the column, its type, and the desired valueSQLException
- 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 valuesprotected ExecutablePreparedStatementBase.LOBContent<InputStream> toBinaryStream(String valueLobFile) throws LiquibaseException, IOException
LiquibaseException
IOException
protected ExecutablePreparedStatementBase.LOBContent<Reader> toCharacterStream(String valueLobFile, String encoding) throws IOException, LiquibaseException
IOException
LiquibaseException
protected InputStream getResourceAsStream(String valueLobFile) throws IOException
IOException
public boolean skipOnUnsupported()
skipOnUnsupported
in interface SqlStatement
public String getCatalogName()
public String getSchemaName()
public String getTableName()
public List<? extends ColumnConfig> getColumns()
public ChangeSet getChangeSet()
public ResourceAccessor getResourceAccessor()
protected long getContentLength(InputStream in) throws IOException
IOException
protected long getContentLength(Reader reader) throws IOException
IOException
Copyright © 2023 Liquibase.org. All rights reserved.