Table of Contents

Class PostgreSqlSchemaBuilderCollection

Namespace
LfrlAnvil.PostgreSql.Objects.Builders
Assembly
LfrlAnvil.PostgreSql.dll

Represents a collection of SQL schema builders.

public sealed class PostgreSqlSchemaBuilderCollection : SqlSchemaBuilderCollection, ISqlSchemaBuilderCollection, IReadOnlyCollection<ISqlSchemaBuilder>, IEnumerable<ISqlSchemaBuilder>, IEnumerable
Inheritance
PostgreSqlSchemaBuilderCollection
Implements
Inherited Members

Remarks

PostgreSqlDialect implementation.

Properties

Database

Database that this collection belongs to.

public PostgreSqlDatabaseBuilder Database { get; }

Property Value

PostgreSqlDatabaseBuilder

Default

Default schema.

public PostgreSqlSchemaBuilder Default { get; }

Property Value

PostgreSqlSchemaBuilder

Methods

Create(string)

Creates a new schema builder.

public PostgreSqlSchemaBuilder Create(string name)

Parameters

name string

Name of the schema.

Returns

PostgreSqlSchemaBuilder

New ISqlSchemaBuilder instance.

Exceptions

SqlObjectBuilderException

When schema could not be created.

CreateSchemaBuilder(string)

Creates a new SqlSchemaBuilder instance.

protected override PostgreSqlSchemaBuilder CreateSchemaBuilder(string name)

Parameters

name string

Schema's name.

Returns

PostgreSqlSchemaBuilder

New SqlSchemaBuilder instance.

Get(string)

Returns a schema with the provided name.

[Pure]
public PostgreSqlSchemaBuilder Get(string name)

Parameters

name string

Name of the schema to return.

Returns

PostgreSqlSchemaBuilder

Existing schema.

Exceptions

KeyNotFoundException

When schema does not exist.

GetEnumerator()

Creates a new SqlObjectBuilderEnumerator<TSource, TDestination> instance for this collection.

[Pure]
public SqlObjectBuilderEnumerator<SqlSchemaBuilder, PostgreSqlSchemaBuilder> GetEnumerator()

Returns

SqlObjectBuilderEnumerator<SqlSchemaBuilder, PostgreSqlSchemaBuilder>

New SqlObjectBuilderEnumerator<TSource, TDestination> instance.

GetOrCreate(string)

Creates a new schema builder or returns an existing schema builder.

public PostgreSqlSchemaBuilder GetOrCreate(string name)

Parameters

name string

Name of the schema.

Returns

PostgreSqlSchemaBuilder

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 PostgreSqlSchemaBuilder? TryGet(string name)

Parameters

name string

Name of the schema to return.

Returns

PostgreSqlSchemaBuilder

Existing schema or null when schema does not exist.