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, waitcontinueOnErrorprotected 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
ExecutablePreparedStatementexecute in interface ExecutablePreparedStatementfactory - for creating a PreparedStatement objectDatabaseExceptionprotected PreparedStatement getCachedStatement(String sql)
protected void executePreparedStatement(PreparedStatement stmt) throws SQLException
SQLExceptionprotected 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
LiquibaseExceptionIOExceptionprotected ExecutablePreparedStatementBase.LOBContent<Reader> toCharacterStream(String valueLobFile, String encoding) throws IOException, LiquibaseException
IOExceptionLiquibaseExceptionprotected InputStream getResourceAsStream(String valueLobFile) throws IOException
IOExceptionpublic boolean skipOnUnsupported()
skipOnUnsupported in interface SqlStatementpublic 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
IOExceptionprotected long getContentLength(Reader reader) throws IOException
IOExceptionCopyright © 2023 Liquibase.org. All rights reserved.