Class ExpressionFilterAttribute
Data object plain SQL expression filter attribute
Inherited Members
Namespace: XData.Mapping
Assembly: XData.docfx.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ExpressionFilterAttribute : FilterAttribute
Remarks
Used to filter data by field comparison to plain SQL expression (for example: some_field = substr(other_field, 1, 2))
Hint: Filter field can be represented as expression two by ColumnExpressionAttribute or PropertyExpressionAttribute
WARNING! Sql expressions can use specific Sql dialect features! Data mapping may be not compatible with other database engines!
Constructors
| Improve this Doc View SourceExpressionFilterAttribute(String, String, String)
Expression filter attribute
Declaration
public ExpressionFilterAttribute(string source, string fieldName, string exprText)
Parameters
| Type | Name | Description |
|---|---|---|
| String | source | Primary source alias |
| String | fieldName | Primary field name |
| String | exprText | SQL expression text |
Exceptions
| Type | Condition |
|---|---|
| XDataRuntimeException | SQL expression cannot be null or empty string |
Properties
| Improve this Doc View SourceExprText
SQL expression
Declaration
public string ExprText { get; }
Property Value
| Type | Description |
|---|---|
| String |
Remarks
WARNING! SQL expressions can use specific SQL dialect features! Data mapping may be not compatible with other database engines!
FilterType
Filter type
Declaration
public override FilterType FilterType { get; }
Property Value
| Type | Description |
|---|---|
| FilterType | Expression |
Overrides
| Improve this Doc View SourceTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
Declaration
public override object TypeId { get; }
Property Value
| Type | Description |
|---|---|
| Object | An Object that is a unique identifier for the attribute. |