Table of Contents

Class RegexCondition

Namespace
The.SQL.QIR.Conditions
Assembly
Instagile.dll

Tests whether the Subject value matches the regular expression given by Pattern. Produced by Regex.IsMatch(value, pattern).

[MessagePackObject(false)]
public sealed record RegexCondition : Condition, IEquatable<Condition>, IEquatable<RegexCondition>
Inheritance
RegexCondition
Implements
Inherited Members

Remarks

The regex grammar is whatever the backend natively understands:

  • TransientEntityStore and SQLiteEntityStore use the .NET engine directly
  • PostgreSQL uses POSIX ARE
  • SQL Server uses its REGEXP_LIKE engine Only the IgnoreCase option is translated programmatically; use inline flags (such as (?i) or (?m)) for anything else, as those are understood by every backend.

Constructors

RegexCondition(Value, Value, bool)

Tests whether the Subject value matches the regular expression given by Pattern. Produced by Regex.IsMatch(value, pattern).

public RegexCondition(Value Subject, Value Pattern, bool IgnoreCase = false)

Parameters

Subject Value
Pattern Value
IgnoreCase bool

Remarks

The regex grammar is whatever the backend natively understands:

  • TransientEntityStore and SQLiteEntityStore use the .NET engine directly
  • PostgreSQL uses POSIX ARE
  • SQL Server uses its REGEXP_LIKE engine Only the IgnoreCase option is translated programmatically; use inline flags (such as (?i) or (?m)) for anything else, as those are understood by every backend.

Properties

IgnoreCase

[Key(2)]
public bool IgnoreCase { get; init; }

Property Value

bool

Joins

Joins required to reach this condition.

[IgnoreMember]
public override IEnumerable<Join> Joins { get; }

Property Value

IEnumerable<Join>

Pattern

[Key(1)]
public Value Pattern { get; init; }

Property Value

Value

Subject

[Key(0)]
public Value Subject { get; init; }

Property Value

Value

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Update(Value, Value, bool)

public RegexCondition Update(Value left, Value pattern, bool ignoreCase)

Parameters

left Value
pattern Value
ignoreCase bool

Returns

RegexCondition

WithSource(Table, Table)

public override Condition WithSource(Table oldSource, Table newSource)

Parameters

oldSource Table
newSource Table

Returns

Condition