Implements the necessary logic to choose how the SQL string should be parsed to generate the statements.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| protected String | |
| private String | |
| private Boolean | ignoreOriginalSplitStatements
Deprecated
|
| private Boolean | originalSplitStatements
Deprecated
|
| private boolean | |
| private boolean | splitStatementsSet
Deprecated
To be removed when splitStatements is changed to be type Boolean
|
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public ChangeStatus | checkStatus(Database database)
Overrides liquibase. Implements liquibase. Validate that this change executed successfully against the given database. |
| public CheckSum | generateCheckSum()
Overrides liquibase. Implements liquibase. Calculates the checksum based on the contained SQL. |
| public boolean | generateRollbackStatementsVolatile(Database database)
Overrides liquibase. Implements liquibase. Implementation delegates logic to the
|
| public SqlStatement[] | generateStatements(Database database)
Implements liquibase. Generates one or more SqlStatements depending on how the SQL should be parsed. |
| public boolean | generateStatementsVolatile(Database database)
Overrides liquibase. Implements liquibase. Implementation delegates logic to the
|
| public String | |
| public String | |
| public String | |
| public Boolean | |
| public Boolean | isSplitStatements()
Return if the SQL should be split into multiple statements before passing it to the database. |
| public boolean | |
| public Boolean | isStripComments()
Return if comments should be stripped from the SQL before passing it to the database. |
| protected String | |
| public InputStream | |
| public void | |
| public void | setEndDelimiter(String
the end delimiter to set endDelimiter)Sets the end delimiter for splitting SQL statements. |
| public void | setIgnoreOriginalSplitStatements(Boolean ignoreOriginalSplitStatements)
Deprecated
isOriginalSplitStatements is used by checksums v8 calculator only to define splitStatements behavior |
| public void | |
| public void | setSplitStatements(Boolean splitStatements)
Set whether SQL should be split into multiple statements. |
| public void | |
| public void | setStripComments(Boolean stripComments)
Return true if comments should be stripped from the SQL before passing it to the database. |
| public boolean | Returns: always true (in AbstractSQLChange)Overrides liquibase. Implements liquibase. Implementation delegates logic to the
|
| public ValidationErrors | validate(Database database)
Overrides liquibase. Implements liquibase. Implementation checks the ChangeParameterMetaData for declared required fields
and also delegates logic to the
|
| public Warnings | warn(Database database)
Overrides liquibase. Implements liquibase. Implementation delegates logic to the
|
| dbms | back to summary |
|---|---|
| private String dbms | |
| encoding | back to summary |
|---|---|
| protected String encoding | |
| endDelimiter | back to summary |
|---|---|
| private String endDelimiter | |
| ignoreOriginalSplitStatements | back to summary |
|---|---|
| private Boolean ignoreOriginalSplitStatements
Deprecated
| |
| originalSplitStatements | back to summary |
|---|---|
| private Boolean originalSplitStatements
Deprecated
| |
| splitStatements | back to summary |
|---|---|
| private boolean splitStatements | |
| splitStatementsSet | back to summary |
|---|---|
| private boolean splitStatementsSet
Deprecated To be removed when splitStatements is changed to be type Boolean | |
| sql | back to summary |
|---|---|
| private String sql | |
| stripComments | back to summary |
|---|---|
| private boolean stripComments | |
| AbstractSQLChange | back to summary |
|---|---|
| protected AbstractSQLChange() | |
| checkStatus | back to summary |
|---|---|
| public ChangeStatus checkStatus(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc.
| |
| generateCheckSum | back to summary |
|---|---|
| public CheckSum generateCheckSum() Overrides liquibase. Implements liquibase. Calculates the checksum based on the contained SQL.
| |
| generateRollbackStatementsVolatile | back to summary |
|---|---|
| public boolean generateRollbackStatementsVolatile(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Implementation delegates logic to the
| |
| generateStatements | back to summary |
|---|---|
| public SqlStatement[] generateStatements(Database database) Implements liquibase. Generates one or more SqlStatements depending on how the SQL should be parsed. If split statements is set to true then the SQL is split and each command is made into a separate SqlStatement. If stripping comments is true then any comments are removed before the splitting is executed. The set SQL is passed through thejava. method if a connection is available.
| |
| generateStatementsVolatile | back to summary |
|---|---|
| public boolean generateStatementsVolatile(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Implementation delegates logic to the
| |
| getDbms | back to summary |
|---|---|
| public String getDbms() Implements liquibase.
| |
| getEndDelimiter | back to summary |
|---|---|
| public String getEndDelimiter() Set the end delimiter used to split statements. Will return null if the default delimiter should be used.
| |
| getSql | back to summary |
|---|---|
| public String getSql() Return the raw SQL managed by this Change
| |
| isIgnoreOriginalSplitStatements | back to summary |
|---|---|
| public Boolean isIgnoreOriginalSplitStatements()
Deprecated
| |
| isSplitStatements | back to summary |
|---|---|
| public Boolean isSplitStatements() Return if the SQL should be split into multiple statements before passing it to the database. By default, statements are split around ";" and "go" delimiters. This will always return a non-null value and should be a boolean rather than a Boolean, but that breaks the Bean Standard.
| |
| isSplitStatementsSet | back to summary |
|---|---|
| public boolean isSplitStatementsSet()
Deprecated To be removed when splitStatements is changed to be Boolean type
| |
| isStripComments | back to summary |
|---|---|
| public Boolean isStripComments() Return if comments should be stripped from the SQL before passing it to the database. This will always return a non-null value and should be a boolean rather than a Boolean, but that breaks the Bean Standard.
| |
| normalizeLineEndings | back to summary |
|---|---|
| protected String normalizeLineEndings(String string) | |
| openSqlStream | back to summary |
|---|---|
| public InputStream openSqlStream() throws IOException | |
| setDbms | back to summary |
|---|---|
| public void setDbms(final String dbms) Implements liquibase.
| |
| setEndDelimiter | back to summary |
|---|---|
| public void setEndDelimiter(String endDelimiter) Sets the end delimiter for splitting SQL statements. Set to
| |
| setIgnoreOriginalSplitStatements | back to summary |
|---|---|
| public void setIgnoreOriginalSplitStatements(Boolean ignoreOriginalSplitStatements)
Deprecated
isOriginalSplitStatements is used by checksums v8 calculator only to define splitStatements behavior
| |
| setOriginalSplitStatements | back to summary |
|---|---|
| public void setOriginalSplitStatements(Boolean originalSplitStatements)
Deprecated
| |
| setSplitStatements | back to summary |
|---|---|
| public void setSplitStatements(Boolean splitStatements) Set whether SQL should be split into multiple statements. Passing null sets stripComments to the default value (true). | |
| setSql | back to summary |
|---|---|
| public void setSql(String sql) Set the raw SQL managed by this Change. The passed sql is trimmed and set to null if an empty string is passed. | |
| setStripComments | back to summary |
|---|---|
| public void setStripComments(Boolean stripComments) Return true if comments should be stripped from the SQL before passing it to the database. Passing null sets stripComments to the default value (false). | |
| supports | back to summary |
|---|---|
| public boolean supports(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Implementation delegates logic to the
| |
| validate | back to summary |
|---|---|
| public ValidationErrors validate(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Implementation checks the ChangeParameterMetaData for declared required fields
and also delegates logic to the
| |
| warn | back to summary |
|---|---|
| public Warnings warn(Database database) Overrides liquibase. Implements liquibase. Doc from liquibase. Implementation delegates logic to the
| |
| Modifier and Type | Field and Description |
|---|---|
| private final InputStream |
| Access | Constructor and Description |
|---|---|
| public | NormalizingStream(String endDelimiter, Boolean splitStatements, Boolean stripComments, InputStream stream)
Deprecated
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this input stream and releases any system resources associated with the stream. |
| private boolean | |
| public synchronized void | mark(int
the maximum limit of bytes that can be read before
the mark position becomes invalid. readLimit)Overrides java. Marks the current position in this input stream. |
| public boolean | markSupported()
Overrides java. Tests if this input stream supports the |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public synchronized void | reset()
Overrides java. Repositions this stream to the position at the time the
|
| stream | back to summary |
|---|---|
| private final InputStream stream | |
| NormalizingStream | back to summary |
|---|---|
| public NormalizingStream(String endDelimiter, Boolean splitStatements, Boolean stripComments, InputStream stream)
Deprecated
| |
| NormalizingStream | back to summary |
|---|---|
| public NormalizingStream(InputStream stream) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this input stream and releases any system resources associated with the stream.
| |
| isWhiteSpace | back to summary |
|---|---|
| private boolean isWhiteSpace(int read) | |
| mark | back to summary |
|---|---|
| public synchronized void mark(int readLimit) Overrides java. Doc from java. Marks the current position in this input stream. A subsequent call to
the The The general contract of Marking a closed stream should not have any effect on the stream.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Doc from java. Tests if this input stream supports the
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| reset | back to summary |
|---|---|
| public synchronized void reset() throws IOException Overrides java. Doc from java. Repositions this stream to the position at the time the
The general contract of
| |