Class Database
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
namestringThe name of the database.
providerNamestringThe name of the database provider used to connect to the database.
connectionStringstringThe 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
DataTypes
The collection of data types defined in the database.
public DataTypeCollection DataTypes { get; }
Property Value
ProviderName
The name of the database provider used to connect to the database.
public string ProviderName { get; }
Property Value
Tables
The collection of tables in the database.
public TableCollection Tables { get; }
Property Value
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
visitorIVisitorThe visitor instance that will perform operations on the implementing class.