Table of Contents

Struct PgTypeId

Namespace
Npgsql.Internal.Postgres
Assembly
Npgsql.dll

A discriminated union of Oid and DataTypeName.

public readonly struct PgTypeId : IEquatable<PgTypeId>
Implements
Inherited Members

Constructors

PgTypeId(DataTypeName)

public PgTypeId(DataTypeName name)

Parameters

name DataTypeName

PgTypeId(Oid)

public PgTypeId(Oid oid)

Parameters

oid Oid

Properties

DataTypeName

public DataTypeName DataTypeName { get; }

Property Value

DataTypeName

IsDataTypeName

public bool IsDataTypeName { get; }

Property Value

bool

IsOid

public bool IsOid { get; }

Property Value

bool

Oid

public Oid Oid { get; }

Property Value

Oid

Methods

Equals(PgTypeId)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PgTypeId other)

Parameters

other PgTypeId

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(PgTypeId, PgTypeId)

public static bool operator ==(PgTypeId left, PgTypeId right)

Parameters

left PgTypeId
right PgTypeId

Returns

bool

implicit operator PgTypeId(DataTypeName)

public static implicit operator PgTypeId(DataTypeName name)

Parameters

name DataTypeName

Returns

PgTypeId

implicit operator PgTypeId(Oid)

public static implicit operator PgTypeId(Oid id)

Parameters

id Oid

Returns

PgTypeId

operator !=(PgTypeId, PgTypeId)

public static bool operator !=(PgTypeId left, PgTypeId right)

Parameters

left PgTypeId
right PgTypeId

Returns

bool