-
Notifications
You must be signed in to change notification settings - Fork 874
Expand file tree
/
Copy pathPostgresRangeType.cs
More file actions
43 lines (38 loc) · 1.24 KB
/
PostgresRangeType.cs
File metadata and controls
43 lines (38 loc) · 1.24 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
39
40
41
42
43
using Npgsql.Internal.Postgres;
namespace Npgsql.PostgresTypes;
/// <summary>
/// Represents a PostgreSQL range data type.
/// </summary>
/// <remarks>
/// See https://www.postgresql.org/docs/current/static/rangetypes.html.
/// </remarks>
public class PostgresRangeType : PostgresType
{
/// <summary>
/// The PostgreSQL data type of the subtype of this range.
/// </summary>
public PostgresType Subtype { get; }
/// <summary>
/// The PostgreSQL data type of the multirange of this range.
/// </summary>
public PostgresMultirangeType? Multirange { get; internal set; }
/// <summary>
/// Constructs a representation of a PostgreSQL range data type.
/// </summary>
protected internal PostgresRangeType(
string ns, string name, uint oid, PostgresType subtypePostgresType)
: base(ns, name, oid)
{
Subtype = subtypePostgresType;
Subtype.Range = this;
}
/// <summary>
/// Constructs a representation of a PostgreSQL range data type.
/// </summary>
internal PostgresRangeType(DataTypeName dataTypeName, Oid oid, PostgresType subtypePostgresType)
: base(dataTypeName, oid)
{
Subtype = subtypePostgresType;
Subtype.Range = this;
}
}