Class PostgreSqlSchemaCollection
- Namespace
- LfrlAnvil.PostgreSql.Objects
- Assembly
- LfrlAnvil.PostgreSql.dll
Represents a collection of SQL schemas.
public sealed class PostgreSqlSchemaCollection : SqlSchemaCollection, ISqlSchemaCollection, IReadOnlyCollection<ISqlSchema>, IEnumerable<ISqlSchema>, IEnumerable
- Inheritance
-
PostgreSqlSchemaCollection
- Implements
- Inherited Members
Remarks
PostgreSqlDialect implementation.
Properties
Database
Database that this collection belongs to.
public PostgreSqlDatabase Database { get; }
Property Value
Default
Default schema.
public PostgreSqlSchema Default { get; }
Property Value
Methods
CreateSchema(SqlSchemaBuilder)
Creates a new SqlSchema instance.
protected override PostgreSqlSchema CreateSchema(SqlSchemaBuilder builder)
Parameters
builder
SqlSchemaBuilderSource schema builder.
Returns
- PostgreSqlSchema
New SqlSchema instance.
Get(string)
Returns a schema with the provided name
.
[Pure]
public PostgreSqlSchema Get(string name)
Parameters
name
stringName of the schema to return.
Returns
- PostgreSqlSchema
Existing schema.
Exceptions
- KeyNotFoundException
When schema does not exist.
GetEnumerator()
Creates a new SqlObjectEnumerator<TSource, TDestination> instance for this collection.
[Pure]
public SqlObjectEnumerator<SqlSchema, PostgreSqlSchema> GetEnumerator()
Returns
- SqlObjectEnumerator<SqlSchema, PostgreSqlSchema>
New SqlObjectEnumerator<TSource, TDestination> instance.
TryGet(string)
Attempts to return a schema with the provided name
.
[Pure]
public PostgreSqlSchema? TryGet(string name)
Parameters
name
stringName of the schema to return.
Returns
- PostgreSqlSchema
Existing schema or null when schema does not exist.