-
Notifications
You must be signed in to change notification settings - Fork 874
Expand file tree
/
Copy pathPostgresEnumType.cs
More file actions
33 lines (27 loc) · 930 Bytes
/
PostgresEnumType.cs
File metadata and controls
33 lines (27 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Collections.Generic;
using Npgsql.Internal.Postgres;
namespace Npgsql.PostgresTypes;
/// <summary>
/// Represents a PostgreSQL enum data type.
/// </summary>
/// <remarks>
/// See https://www.postgresql.org/docs/current/static/datatype-enum.html.
/// </remarks>
public class PostgresEnumType : PostgresType
{
/// <summary>
/// The enum's fields.
/// </summary>
public IReadOnlyList<string> Labels => MutableLabels;
internal List<string> MutableLabels { get; } = [];
/// <summary>
/// Constructs a representation of a PostgreSQL enum data type.
/// </summary>
protected internal PostgresEnumType(string ns, string name, uint oid)
: base(ns, name, oid) {}
/// <summary>
/// Constructs a representation of a PostgreSQL enum data type.
/// </summary>
internal PostgresEnumType(DataTypeName dataTypeName, Oid oid)
: base(dataTypeName, oid) {}
}