FieldExpression Class
From RemObjects Wiki
This is a Data Abstract for .NET Library topic
Please do not modify the page structure, but feel free to modify/add text.
Contents |
Overview
This class is used to represent data table fields in Dynamic Where expressions. For example, see how the database field ID is represented in the SQL query WHERE clause and in the equal Dynamic Where expression:
SELECT * FROM Employees WHERE (ID=42)
WhereExpression where = new RemObjects.DataAbstract.Expressions.BinaryExpression( new RemObjects.DataAbstract.Expressions.FieldExpression("ID"), new RemObjects.DataAbstract.Expressions.ConstantExpression(42), RemObjects.DataAbstract.Expressions.BinaryOperator.Equal);
Location
- Assembly: RemObjects.DataAbstract.dll
- Namespace: RemObjects.DataAbstract.Expressions
- WhereExpression
- FieldExpression
Properties
| FieldName |
|---|
|
Name of the database field represented by this instance.
|
| Kind |
|
The kind of WhereExpression. For this class, it equals WhereKind.Field.
|
| TableName |
|
|
Instance Methods
| constructor () |
|---|
|
Creates a new instance of the FieldExpression class. Note that you have to set at least the FieldName property to be able to use this instance in Dynamic Where expressions.
|
| constructor (String) |
|
Creates a new instance of the FieldExpression class and sets its FieldName property.
|
| constructor (String, String) |
|
|
| ReadFromXml |
|
Deserializes the field expression from the provided XmlNode. The node value (its InnerText) is assigned to the FieldName property. If the node contains the attribute tablename, its value is assigned to the TableName property.
|
| ToSQLString |
|
Creates an SQL representation of this FieldExpression instance and appends it to the provided StringBuilder. For example, this method call (new FieldExpression("ClassName")).ToSQLString(someStringBuilder) will result in appending the string "ClassName" to someStringBuilder.
|
| WriteToXml |
|
Serializes this FieldExpression instance into an XmlElement and appends it as a child to the provided XmlNode. While the serialized FieldName property is saved as text node, the TableName property (if assigned) is saved as attribute tablename of this XmlNode.
|
See Also
- Lists
- Data Abstract for .NET: Namespaces – Interfaces – Classes – Enums
- RemObjects SDK for .NET: Namespaces – Interfaces – Classes – Enums
- Data Abstract shared: Data Types – File Types
- other editions
- Data Abstract for Delphi: Interfaces – Classes – Enums
- Data Abstract for Xcode: Protocols – Classes – Enums
- Data Abstract for .NET: Namespaces – Interfaces – Classes – Enums
Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode
Glossary — Architecture — Articles — Features — Library — Samples