Table of Contents

Struct SqlDatabaseNamedSchemaObjectsSet<T>

Namespace
LfrlAnvil.Sql.Internal
Assembly
LfrlAnvil.Sql.Core.dll

Represents a set of named SqlObjectBuilder instances that may belong to an SQL schema.

public readonly struct SqlDatabaseNamedSchemaObjectsSet<T> where T : SqlObjectBuilder

Type Parameters

T

SQL object builder type.

Inherited Members

Properties

Count

Number of elements in this set.

public int Count { get; }

Property Value

int

Methods

Add(SqlSchemaObjectName, T)

Attempts to add the provided obj to this set.

public bool Add(SqlSchemaObjectName name, T obj)

Parameters

name SqlSchemaObjectName

Name of the object.

obj T

Object to add.

Returns

bool

true when object was added, otherwise false.

Clear()

Removes all objects from this set.

public void Clear()

Create()

Creates a new empty SqlDatabaseNamedSchemaObjectsSet<T> instance.

[Pure]
public static SqlDatabaseNamedSchemaObjectsSet<T> Create()

Returns

SqlDatabaseNamedSchemaObjectsSet<T>

New SqlDatabaseNamedSchemaObjectsSet<T> instance.

GetEnumerator()

Creates a new enumerator for this set.

[Pure]
public SqlDatabaseNamedSchemaObjectsSet<T>.Enumerator GetEnumerator()

Returns

SqlDatabaseNamedSchemaObjectsSet<T>.Enumerator

New enumerator.

Remove(SqlSchemaObjectName)

Attempts to remove an object by its name from this set.

public T? Remove(SqlSchemaObjectName name)

Parameters

name SqlSchemaObjectName

Name of the object to remove.

Returns

T

Removed object or null when it does not exist.

TryGetObject(SqlSchemaObjectName)

Attempts to retrieve an object associated with the provided name from this set.

[Pure]
public T? TryGetObject(SqlSchemaObjectName name)

Parameters

name SqlSchemaObjectName

Name of the object to retrieve.

Returns

T

Existing object or null when it does not exist.