-
Notifications
You must be signed in to change notification settings - Fork 874
Expand file tree
/
Copy pathPostgresMultirangeType.cs
More file actions
38 lines (34 loc) · 1.18 KB
/
PostgresMultirangeType.cs
File metadata and controls
38 lines (34 loc) · 1.18 KB
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
34
35
36
37
38
using Npgsql.Internal.Postgres;
namespace Npgsql.PostgresTypes;
/// <summary>
/// Represents a PostgreSQL multirange data type.
/// </summary>
/// <remarks>
/// <p>See https://www.postgresql.org/docs/current/static/rangetypes.html.</p>
/// <p>Multirange types were introduced in PostgreSQL 14.</p>
/// </remarks>
public class PostgresMultirangeType : PostgresType
{
/// <summary>
/// The PostgreSQL data type of the range of this multirange.
/// </summary>
public PostgresRangeType Subrange { get; }
/// <summary>
/// Constructs a representation of a PostgreSQL multirange data type.
/// </summary>
protected internal PostgresMultirangeType(string ns, string name, uint oid, PostgresRangeType rangePostgresType)
: base(ns, name, oid)
{
Subrange = rangePostgresType;
Subrange.Multirange = this;
}
/// <summary>
/// Constructs a representation of a PostgreSQL multirange data type.
/// </summary>
internal PostgresMultirangeType(DataTypeName dataTypeName, Oid oid, PostgresRangeType rangePostgresType)
: base(dataTypeName, oid)
{
Subrange = rangePostgresType;
Subrange.Multirange = this;
}
}