Interface IVisitor
- Namespace
- DbExport
- Assembly
- DbExport.Api.dll
Defines the Visitor pattern for traversing the database schema. Each method corresponds to a specific schema element, allowing for operations to be performed on databases, tables, columns, keys, and indexes without modifying their classes. This design promotes separation of concerns and makes it easier to add new operations on the schema elements without changing their structure.
public interface IVisitor
Methods
VisitColumn(Column)
Visits a Column object, allowing the visitor to perform operations on the column schema.
void VisitColumn(Column column)
Parameters
columnColumnThe Column object to be visited.
VisitDataType(DataType)
Visits a DataType object, allowing the visitor to perform operations on the data type schema.
void VisitDataType(DataType dataType)
Parameters
dataTypeDataTypeThe DataType object to be visited.
VisitDatabase(Database)
Visits a Database object, allowing the visitor to perform operations on the database schema. This method is the entry point for traversing the database structure.
void VisitDatabase(Database database)
Parameters
databaseDatabaseThe Database object to be visited.
VisitForeignKey(ForeignKey)
Visits a ForeignKey object, allowing the visitor to perform operations on the foreign key schema.
void VisitForeignKey(ForeignKey foreignKey)
Parameters
foreignKeyForeignKeyThe ForeignKey object to be visited.
VisitIndex(Index)
Visits an Index object, allowing the visitor to perform operations on the index schema.
void VisitIndex(Index index)
Parameters
indexIndexThe Index object to be visited.
VisitPrimaryKey(PrimaryKey)
Visits a PrimaryKey object, allowing the visitor to perform operations on the primary key schema.
void VisitPrimaryKey(PrimaryKey primaryKey)
Parameters
primaryKeyPrimaryKeyThe PrimaryKey object to be visited.
VisitTable(Table)
Visits a Table object, allowing the visitor to perform operations on the table schema.
void VisitTable(Table table)
Parameters
tableTableThe Table object to be visited.