#include <IValidationObserver.h>
Observer interface for validation.
Definition at line 14 of file IValidationObserver.h.
Defines types of validation errors.
Enumerator |
---|
INVALID_COLUMN_TYPE |
The column type in SQL table is different from definition in zserio.
|
INVALID_COLUMN_CONSTRAINT |
The column constraint in SQL table is different from definition in zserio.
|
COLUMN_MISSING |
The column is defined in zserio but it is not in SQL table.
|
COLUMN_SUPERFLUOUS |
The column is not defined in zserio but it is in SQL table.
|
VALUE_OUT_OF_RANGE |
Value in SQL table is out of range according to the definition in zserio.
|
INVALID_VALUE |
Value in SQL table is invalid according to the definition in zserio.
|
BLOB_PARSE_FAILED |
Parsing of read blob from SQL table failed.
|
BLOB_COMPARE_FAILED |
Comparing of read blob from SQL table to parsed blob written in bit stream failed.
|
Definition at line 56 of file IValidationObserver.h.
virtual zserio::IValidationObserver::~IValidationObserver |
( |
| ) |
|
|
virtualdefault |
virtual void zserio::IValidationObserver::beginDatabase |
( |
size_t |
numberOfTables | ) |
|
|
pure virtual |
Called before the database is validated.
- Parameters
-
numberOfTables | Number of tables in the database. |
virtual bool zserio::IValidationObserver::beginTable |
( |
StringView |
tableName, |
|
|
size_t |
numberOfRows |
|
) |
| |
|
pure virtual |
Called just before the table with tableName is validated.
- Parameters
-
tableName | Name of the table which is going to be validated. |
numberOfRows | Number of rows in the table. |
- Returns
- True to validate the table, false to skip the table.
virtual void zserio::IValidationObserver::endDatabase |
( |
size_t |
numberOfValidatedTables | ) |
|
|
pure virtual |
Called after the database is validated.
- Parameters
-
numberOfValidatedTables | Number of tables which were validated. |
virtual bool zserio::IValidationObserver::endTable |
( |
StringView |
tableName, |
|
|
size_t |
numberOfValidatedRows |
|
) |
| |
|
pure virtual |
Called after the table with tableName validation is finished.
- Parameters
-
tableName | Name of to the validated table. |
numberOfValidatedRows | Number of validated rows. |
- Returns
- True to continue validation, false to stop the whole validation.
Called when an error is detected.
- Parameters
-
tableName | Name of the table where the validation error occurred. |
fieldName | Name of the column where the validation error occurred. |
primaryKeyValues | Values of the primary key to identify the row where the validation error occurred. |
- Note
- When the table has no primary key, rowid is used.
- Returns
- True to continue validation, false to skip validation of the rest of the current table.
The documentation for this class was generated from the following file: