Class Database

Namespace
DbExport.Schema
Assembly
DbExport.Api.dll

Represents a database within the schema, containing metadata about its provider, connection information, data types, and tables. It serves as the root schema item for database-related operations.

public class Database : SchemaItem, IVisitorAcceptor
Inheritance
Database
Implements
Inherited Members

Remarks

The Database class encapsulates the essential information about a database, including its name, provider name, connection string, and collections of data types and tables. It implements the ISchemaItem interface and provides methods to accept a visitor pattern for traversing the database's structure.

Constructors

Database(string, string, string)

Represents a database within the schema, containing metadata about its provider, connection information, data types, and tables. It serves as the root schema item for database-related operations.

public Database(string name, string providerName, string connectionString)

Parameters

name string

The name of the database.

providerName string

The name of the database provider used to connect to the database.

connectionString string

The connection string used to connect to the database.

Remarks

The Database class encapsulates the essential information about a database, including its name, provider name, connection string, and collections of data types and tables. It implements the ISchemaItem interface and provides methods to accept a visitor pattern for traversing the database's structure.

Properties

ConnectionString

The connection string used to connect to the database.

public string ConnectionString { get; }

Property Value

string

DataTypes

The collection of data types defined in the database.

public DataTypeCollection DataTypes { get; }

Property Value

DataTypeCollection

ProviderName

The name of the database provider used to connect to the database.

public string ProviderName { get; }

Property Value

string

Tables

The collection of tables in the database.

public TableCollection Tables { get; }

Property Value

TableCollection

Methods

AcceptVisitor(IVisitor)

Accepts a visitor, allowing it to perform operations on the implementing class. The visitor will typically have specific methods for handling different types of elements in the object structure.

public override void AcceptVisitor(IVisitor visitor)

Parameters

visitor IVisitor

The visitor instance that will perform operations on the implementing class.