Class MySqlSchemaBuilderCollection
Represents a collection of SQL schema builders.
public sealed class MySqlSchemaBuilderCollection : SqlSchemaBuilderCollection, ISqlSchemaBuilderCollection, IReadOnlyCollection<ISqlSchemaBuilder>, IEnumerable<ISqlSchemaBuilder>, IEnumerable
- Inheritance
-
MySqlSchemaBuilderCollection
- Implements
- Inherited Members
Remarks
MySqlDialect implementation.
Properties
Database
Database that this collection belongs to.
public MySqlDatabaseBuilder Database { get; }
Property Value
Default
Default schema.
public MySqlSchemaBuilder Default { get; }
Property Value
Methods
Create(string)
Creates a new schema builder.
public MySqlSchemaBuilder Create(string name)
Parameters
name
stringName of the schema.
Returns
- MySqlSchemaBuilder
New ISqlSchemaBuilder instance.
Exceptions
- SqlObjectBuilderException
When schema could not be created.
CreateSchemaBuilder(string)
Creates a new SqlSchemaBuilder instance.
protected override MySqlSchemaBuilder CreateSchemaBuilder(string name)
Parameters
name
stringSchema's name.
Returns
- MySqlSchemaBuilder
New SqlSchemaBuilder instance.
Get(string)
Returns a schema with the provided name
.
[Pure]
public MySqlSchemaBuilder Get(string name)
Parameters
name
stringName of the schema to return.
Returns
- MySqlSchemaBuilder
Existing schema.
Exceptions
- KeyNotFoundException
When schema does not exist.
GetEnumerator()
Creates a new SqlObjectBuilderEnumerator<TSource, TDestination> instance for this collection.
[Pure]
public SqlObjectBuilderEnumerator<SqlSchemaBuilder, MySqlSchemaBuilder> GetEnumerator()
Returns
- SqlObjectBuilderEnumerator<SqlSchemaBuilder, MySqlSchemaBuilder>
New SqlObjectBuilderEnumerator<TSource, TDestination> instance.
GetOrCreate(string)
Creates a new schema builder or returns an existing schema builder.
public MySqlSchemaBuilder GetOrCreate(string name)
Parameters
name
stringName of the schema.
Returns
- MySqlSchemaBuilder
New ISqlSchemaBuilder instance or an existing schema builder.
Exceptions
- SqlObjectBuilderException
When schema does not exist and could not be created.
TryGet(string)
Attempts to return a schema with the provided name
.
[Pure]
public MySqlSchemaBuilder? TryGet(string name)
Parameters
name
stringName of the schema to return.
Returns
- MySqlSchemaBuilder
Existing schema or null when schema does not exist.