Struct NpgsqlTsVector.Lexeme.WordEntryPos
- Namespace
- NpgsqlTypes
- Assembly
- Npgsql.dll
Represents a word entry position and an optional weight.
public struct NpgsqlTsVector.Lexeme.WordEntryPos : IEquatable<NpgsqlTsVector.Lexeme.WordEntryPos>
- Implements
- Inherited Members
Constructors
WordEntryPos(int, Weight)
Creates a WordEntryPos with a given position and weight.
public WordEntryPos(int pos, NpgsqlTsVector.Lexeme.Weight weight = Weight.D)
Parameters
pos
intPosition values can range from 1 to 16383; larger numbers are silently set to 16383.
weight
NpgsqlTsVector.Lexeme.WeightA weight labeled between A and D.
Properties
Pos
The position is a 14-bit unsigned integer indicating the position in the text this lexeme occurs. Cannot be 0.
public int Pos { get; }
Property Value
Weight
The weight is labeled from A to D. D is the default, and not printed.
public NpgsqlTsVector.Lexeme.Weight Weight { get; }
Property Value
Methods
Equals(WordEntryPos)
Determines whether the specified object is equal to the current object.
public bool Equals(NpgsqlTsVector.Lexeme.WordEntryPos o)
Parameters
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? o)
Parameters
o
object
Returns
GetHashCode()
Gets a hash code for the current object.
public override int GetHashCode()
Returns
ToString()
Prints this lexeme in PostgreSQL's format, i.e. position is followed by weight (weight is only printed if A, B or C).
public override string ToString()
Returns
Operators
operator ==(WordEntryPos, WordEntryPos)
Determines whether the specified object is equal to the current object.
public static bool operator ==(NpgsqlTsVector.Lexeme.WordEntryPos left, NpgsqlTsVector.Lexeme.WordEntryPos right)
Parameters
left
NpgsqlTsVector.Lexeme.WordEntryPosright
NpgsqlTsVector.Lexeme.WordEntryPos
Returns
operator !=(WordEntryPos, WordEntryPos)
Determines whether the specified object is unequal to the current object.
public static bool operator !=(NpgsqlTsVector.Lexeme.WordEntryPos left, NpgsqlTsVector.Lexeme.WordEntryPos right)
Parameters
left
NpgsqlTsVector.Lexeme.WordEntryPosright
NpgsqlTsVector.Lexeme.WordEntryPos