Table of Contents

Interface ISqlSchemaBuilderCollection

Namespace
LfrlAnvil.Sql.Objects.Builders
Assembly
LfrlAnvil.Sql.Core.dll

Represents a collection of SQL schema builders.

public interface ISqlSchemaBuilderCollection : IReadOnlyCollection<ISqlSchemaBuilder>, IEnumerable<ISqlSchemaBuilder>, IEnumerable
Inherited Members

Properties

Database

Database that this collection belongs to.

ISqlDatabaseBuilder Database { get; }

Property Value

ISqlDatabaseBuilder

Default

Default schema.

ISqlSchemaBuilder Default { get; }

Property Value

ISqlSchemaBuilder

Methods

Contains(string)

Checks whether or not a schema with the provided name exists.

[Pure]
bool Contains(string name)

Parameters

name string

Name to check.

Returns

bool

true when schema exists, otherwise false.

Create(string)

Creates a new schema builder.

ISqlSchemaBuilder Create(string name)

Parameters

name string

Name of the schema.

Returns

ISqlSchemaBuilder

New ISqlSchemaBuilder instance.

Exceptions

SqlObjectBuilderException

When schema could not be created.

Get(string)

Returns a schema with the provided name.

[Pure]
ISqlSchemaBuilder Get(string name)

Parameters

name string

Name of the schema to return.

Returns

ISqlSchemaBuilder

Existing schema.

Exceptions

KeyNotFoundException

When schema does not exist.

GetOrCreate(string)

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

ISqlSchemaBuilder GetOrCreate(string name)

Parameters

name string

Name of the schema.

Returns

ISqlSchemaBuilder

New ISqlSchemaBuilder instance or an existing schema builder.

Exceptions

SqlObjectBuilderException

When schema does not exist and could not be created.

Remove(string)

Attempts to remove a schema by its name.

bool Remove(string name)

Parameters

name string

Name of the schema to remove.

Returns

bool

true when schema was removed, otherwise false.

TryGet(string)

Attempts to return a schema with the provided name.

[Pure]
ISqlSchemaBuilder? TryGet(string name)

Parameters

name string

Name of the schema to return.

Returns

ISqlSchemaBuilder

Existing schema or null when schema does not exist.