Class PostgresRange
- Namespace
- Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
Represents the metadata for a PostgreSQL range.
public class PostgresRange
- Inheritance
-
PostgresRange
- Inherited Members
Properties
Annotatable
The Annotatable that stores the range.
public virtual Annotatable Annotatable { get; }
Property Value
CanonicalFunction
The function defining a "step" in a discrete range.
public virtual string? CanonicalFunction { get; set; }
Property Value
Collation
The collation to use.
public virtual string? Collation { get; set; }
Property Value
Name
The range name.
public virtual string Name { get; }
Property Value
Schema
The range schema or null to represent the default schema.
public virtual string? Schema { get; }
Property Value
Subtype
The subtype of the range.
public virtual string Subtype { get; set; }
Property Value
SubtypeDiff
The function defining a difference in subtype values.
public virtual string? SubtypeDiff { get; set; }
Property Value
SubtypeOpClass
The operator class to use.
public virtual string? SubtypeOpClass { get; set; }
Property Value
Methods
FindPostgresRange(IReadOnlyAnnotatable, string?, string)
Finds a PostgresRange in the IAnnotatable, or returns null if not found.
public static PostgresRange? FindPostgresRange(IReadOnlyAnnotatable annotatable, string? schema, string name)
Parameters
annotatable
IReadOnlyAnnotatableThe annotatable to search for the range.
schema
stringThe range schema or null to use the model's default schema.
name
stringThe range name.
Returns
- PostgresRange
The PostgresRange from the IAnnotatable.
Exceptions
- ArgumentException
schema
- ArgumentNullException
annotatable
- ArgumentNullException
name
GetOrAddPostgresRange(IMutableAnnotatable, string?, string, string, string?, string?, string?, string?)
Gets or adds a PostgresRange from or to the IMutableAnnotatable.
public static PostgresRange GetOrAddPostgresRange(IMutableAnnotatable annotatable, string? schema, string name, string subtype, string? canonicalFunction = null, string? subtypeOpClass = null, string? collation = null, string? subtypeDiff = null)
Parameters
annotatable
IMutableAnnotatableThe annotatable from which to get or add the range.
schema
stringThe range schema or null to use the model's default schema.
name
stringThe range name.
subtype
stringThe range subtype.
canonicalFunction
stringsubtypeOpClass
stringcollation
stringsubtypeDiff
string
Returns
- PostgresRange
The PostgresRange from the IMutableAnnotatable.
Exceptions
- ArgumentException
schema
- ArgumentNullException
annotatable
- ArgumentNullException
name
- ArgumentNullException
subtype
GetPostgresRanges(IReadOnlyAnnotatable)
Gets the collection of PostgresRange stored in the IAnnotatable.
public static IEnumerable<PostgresRange> GetPostgresRanges(IReadOnlyAnnotatable annotatable)
Parameters
annotatable
IReadOnlyAnnotatableThe annotatable to search for PostgresRange annotations.
Returns
- IEnumerable<PostgresRange>
The collection of PostgresRange stored in the IAnnotatable.
Exceptions
- ArgumentNullException
annotatable