Class PostgreSqlColumnCollection
- Namespace
- LfrlAnvil.PostgreSql.Objects
- Assembly
- LfrlAnvil.PostgreSql.dll
Represents a collection of SQL table columns.
public sealed class PostgreSqlColumnCollection : SqlColumnCollection, ISqlColumnCollection, IReadOnlyCollection<ISqlColumn>, IEnumerable<ISqlColumn>, IEnumerable
- Inheritance
-
PostgreSqlColumnCollection
- Implements
- Inherited Members
Remarks
PostgreSqlDialect implementation.
Properties
Table
Table that this collection belongs to.
public PostgreSqlTable Table { get; }
Property Value
Methods
CreateColumn(SqlColumnBuilder)
Creates a new SqlColumn instance.
protected override PostgreSqlColumn CreateColumn(SqlColumnBuilder builder)
Parameters
builder
SqlColumnBuilderSource column builder.
Returns
- PostgreSqlColumn
New SqlColumn instance.
Get(string)
Returns a column with the provided name
.
[Pure]
public PostgreSqlColumn Get(string name)
Parameters
name
stringName of the column to return.
Returns
- PostgreSqlColumn
Existing column.
Exceptions
- KeyNotFoundException
When column does not exist.
GetEnumerator()
Creates a new SqlObjectEnumerator<TSource, TDestination> instance for this collection.
[Pure]
public SqlObjectEnumerator<SqlColumn, PostgreSqlColumn> GetEnumerator()
Returns
- SqlObjectEnumerator<SqlColumn, PostgreSqlColumn>
New SqlObjectEnumerator<TSource, TDestination> instance.
TryGet(string)
Attempts to return a column with the provided name
.
[Pure]
public PostgreSqlColumn? TryGet(string name)
Parameters
name
stringName of the column to return.
Returns
- PostgreSqlColumn
Existing column or null when column does not exist.