Class NpgsqlTsQuery
- Namespace
- NpgsqlTypes
- Assembly
- Npgsql.dll
Represents a PostgreSQL tsquery. This is the base class for the lexeme, not, or, and, and "followed by" nodes.
public abstract class NpgsqlTsQuery : IEquatable<NpgsqlTsQuery>
- Inheritance
-
NpgsqlTsQuery
- Implements
- Derived
- Inherited Members
Constructors
NpgsqlTsQuery(NodeKind)
Constructs an NpgsqlTsQuery.
protected NpgsqlTsQuery(NpgsqlTsQuery.NodeKind kind)
Parameters
kind
NpgsqlTsQuery.NodeKind
Properties
Kind
Node kind
public NpgsqlTsQuery.NodeKind Kind { get; }
Property Value
Methods
Equals(NpgsqlTsQuery?)
Returns a value indicating whether this instance and a specified NpgsqlTsQuery object represent the same value.
public abstract bool Equals(NpgsqlTsQuery? other)
Parameters
other
NpgsqlTsQueryAn object to compare to this instance.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Parse(string)
Parses a tsquery in PostgreSQL's text format.
[Obsolete("Client-side parsing of NpgsqlTsQuery is unreliable and cannot fully duplicate the PostgreSQL logic. Use PG functions instead (e.g. to_tsquery)")]
public static NpgsqlTsQuery Parse(string value)
Parameters
value
string
Returns
ToString()
Writes the tsquery in PostgreSQL's text format.
public override string ToString()
Returns
Write(StringBuilder)
Writes the tsquery in PostgreSQL's text format.
public void Write(StringBuilder stringBuilder)
Parameters
stringBuilder
StringBuilder
Operators
operator ==(NpgsqlTsQuery?, NpgsqlTsQuery?)
Indicates whether the values of two specified NpgsqlTsQuery objects are equal.
public static bool operator ==(NpgsqlTsQuery? left, NpgsqlTsQuery? right)
Parameters
left
NpgsqlTsQueryThe first object to compare.
right
NpgsqlTsQueryThe second object to compare.
Returns
operator !=(NpgsqlTsQuery?, NpgsqlTsQuery?)
Indicates whether the values of two specified NpgsqlTsQuery objects are not equal.
public static bool operator !=(NpgsqlTsQuery? left, NpgsqlTsQuery? right)
Parameters
left
NpgsqlTsQueryThe first object to compare.
right
NpgsqlTsQueryThe second object to compare.