Class PgRegexMatchExpression
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
Represents a PostgreSQL regular expression match expression.
public class PgRegexMatchExpression : SqlExpression, IRelationalQuotableExpression, IPrintableExpression, IEquatable<PgRegexMatchExpression>
- Inheritance
-
PgRegexMatchExpression
- Implements
- Inherited Members
Constructors
PgRegexMatchExpression(SqlExpression, SqlExpression, RegexOptions, RelationalTypeMapping?)
Constructs a PgRegexMatchExpression.
public PgRegexMatchExpression(SqlExpression match, SqlExpression pattern, RegexOptions options, RelationalTypeMapping? typeMapping)
Parameters
match
SqlExpressionThe expression to match.
pattern
SqlExpressionThe pattern to match.
options
RegexOptionsThe options for regular expression evaluation.
typeMapping
RelationalTypeMappingThe type mapping for the expression.
Properties
Match
The match expression.
public virtual SqlExpression Match { get; }
Property Value
Options
The options for regular expression evaluation.
public virtual RegexOptions Options { get; }
Property Value
Pattern
The pattern to match.
public virtual SqlExpression Pattern { get; }
Property Value
Type
Gets the static type of the expression that this Expression represents.
public override Type Type { get; }
Property Value
Methods
Equals(PgRegexMatchExpression?)
Indicates whether the current object is equal to another object of the same type.
public virtual bool Equals(PgRegexMatchExpression? other)
Parameters
other
PgRegexMatchExpressionAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? other)
Parameters
other
object
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Print(ExpressionPrinter)
Creates a printable string representation of the given expression using ExpressionPrinter.
protected override void Print(ExpressionPrinter expressionPrinter)
Parameters
expressionPrinter
ExpressionPrinterThe expression printer to use.
Quote()
Quotes the expression; that is, returns an expression that, when evaluated, would construct an expression identical to this one. Used to generate code for precompiled queries, which reconstructs this expression.
public override Expression Quote()
Returns
ToString()
Returns a textual representation of the Expression.
public override string ToString()
Returns
- string
A textual representation of the Expression.
Update(SqlExpression, SqlExpression)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
public virtual PgRegexMatchExpression Update(SqlExpression match, SqlExpression pattern)
Parameters
match
SqlExpressionpattern
SqlExpression
Returns
VisitChildren(ExpressionVisitor)
Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.
protected override Expression VisitChildren(ExpressionVisitor visitor)
Parameters
visitor
ExpressionVisitorAn instance of Func<T, TResult>.
Returns
- Expression
The expression being visited, or an expression which should replace it in the tree.