C# Class Deveel.Data.Sql.Expressions.SqlExpression

Defines the base class for instances that represent SQL expression tree nodes.
The architecture of the SQL Expression domain is to keep the implementation internal to the project, that means it will be possible to construct expressions only through this class, calling factory methods (for example Binary).
Afficher le fichier Open project: deveel/deveeldb Class Usage Examples

Private Properties

Свойство Type Description
AppendTo void
Deserialize SqlExpression
ISerializable void
ISqlFormattable void
Parse SqlExpression
Serialize void
SqlExpression System
SqlExpression System
TryParse bool

Méthodes publiques

Méthode Description
Accept ( SqlExpressionVisitor visitor ) : SqlExpression
Add ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
All ( SqlExpression value ) : SqlQuantifiedExpression
And ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Any ( SqlExpression value ) : SqlQuantifiedExpression
Assign ( SqlExpression reference, SqlExpression valueExpression ) : SqlAssignExpression
Binary ( SqlExpression left, SqlExpressionType expressionType, SqlExpression right ) : SqlBinaryExpression
Cast ( SqlExpression value, SqlType destType ) : SqlCastExpression
Conditional ( SqlExpression testExpression, SqlExpression ifTrue ) : SqlConditionalExpression
Conditional ( SqlExpression testExpression, SqlExpression ifTrue, SqlExpression ifFalse ) : SqlConditionalExpression
Constant ( Field value ) : SqlConstantExpression
Constant ( object value ) : SqlConstantExpression
Divide ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Equal ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Evaluate ( ) : SqlExpression

Statically evaluates the expression, outside any context.

Evaluate ( EvaluateContext context ) : SqlExpression

When overridden by a derived class, this method evaluates the expression within the provided context.

This method is only executed is CanEvaluate is true, and the override method can reduce this expression to a simpler form.

Evaluate ( IRequest context, IVariableResolver variables ) : SqlExpression
Evaluate ( IRequest context, IVariableResolver variables, IGroupResolver group ) : SqlExpression
FunctionCall ( ObjectName functionName ) : SqlFunctionCallExpression
FunctionCall ( ObjectName functionName, InvokeArgument args ) : SqlFunctionCallExpression
FunctionCall ( ObjectName functionName, SqlExpression args ) : SqlFunctionCallExpression
FunctionCall ( string functionName ) : SqlFunctionCallExpression
FunctionCall ( string functionName, InvokeArgument args ) : SqlFunctionCallExpression
FunctionCall ( string functionName, SqlExpression args ) : SqlFunctionCallExpression
GreaterOrEqualThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
GreaterThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Is ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
IsNot ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Like ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Modulo ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Multiply ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Negate ( SqlExpression operand ) : SqlUnaryExpression
Not ( SqlExpression operand ) : SqlUnaryExpression
NotEqual ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
NotLike ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Or ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Parse ( string s ) : SqlExpression

Parses the given SQL string to an expression that can be evaluated.

Parse ( string s, IContext context ) : SqlExpression

Parses the given SQL string to an expression that can be evaluated.

Prepare ( IExpressionPreparer preparer ) : SqlExpression
Quantified ( SqlExpressionType expressionType, SqlExpression value ) : SqlQuantifiedExpression
Reference ( ObjectName objectName ) : SqlReferenceExpression
SmallerOrEqualThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
SmallerThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
Subtract ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
ToString ( ) : string
TryParse ( string s, IExpressionParser parser, SqlExpression &expression ) : bool
Tuple ( SqlExpression expressions ) : SqlTupleExpression
Tuple ( SqlExpression expr1, SqlExpression exp2 ) : SqlTupleExpression
Tuple ( SqlExpression expr1, SqlExpression expr2, SqlExpression expr3 ) : SqlTupleExpression
Unary ( SqlExpressionType expressionType, SqlExpression operand ) : SqlUnaryExpression
UnaryPlus ( SqlExpression operand ) : SqlUnaryExpression
VariableReference ( string varName ) : SqlVariableReferenceExpression
XOr ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression

Méthodes protégées

Méthode Description
GetData ( SerializationInfo info, StreamingContext context ) : void

Private Methods

Méthode Description
AppendTo ( SqlStringBuilder builder ) : void
Deserialize ( BinaryReader reader ) : SqlExpression
ISerializable ( SerializationInfo info, StreamingContext context ) : void
ISqlFormattable ( SqlStringBuilder builder ) : void
Parse ( string s, IExpressionParser parser ) : SqlExpression
Serialize ( SqlExpression expression, BinaryWriter writer ) : void
SqlExpression ( ) : System

Internally constructs the SQL expression, avoiding external implementations to be allowed to inherit this class.

SqlExpression ( SerializationInfo info, StreamingContext context ) : System
TryParse ( string s, IExpressionParser parser, SqlExpression &expression, Exception &error ) : bool

Method Details

Accept() public méthode

public Accept ( SqlExpressionVisitor visitor ) : SqlExpression
visitor SqlExpressionVisitor
Résultat SqlExpression

Add() public static méthode

public static Add ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

All() public static méthode

public static All ( SqlExpression value ) : SqlQuantifiedExpression
value SqlExpression
Résultat SqlQuantifiedExpression

And() public static méthode

public static And ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Any() public static méthode

public static Any ( SqlExpression value ) : SqlQuantifiedExpression
value SqlExpression
Résultat SqlQuantifiedExpression

Assign() public static méthode

public static Assign ( SqlExpression reference, SqlExpression valueExpression ) : SqlAssignExpression
reference SqlExpression
valueExpression SqlExpression
Résultat SqlAssignExpression

Binary() public static méthode

public static Binary ( SqlExpression left, SqlExpressionType expressionType, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
expressionType SqlExpressionType
right SqlExpression
Résultat SqlBinaryExpression

Cast() public static méthode

public static Cast ( SqlExpression value, SqlType destType ) : SqlCastExpression
value SqlExpression
destType SqlType
Résultat SqlCastExpression

Conditional() public static méthode

public static Conditional ( SqlExpression testExpression, SqlExpression ifTrue ) : SqlConditionalExpression
testExpression SqlExpression
ifTrue SqlExpression
Résultat SqlConditionalExpression

Conditional() public static méthode

public static Conditional ( SqlExpression testExpression, SqlExpression ifTrue, SqlExpression ifFalse ) : SqlConditionalExpression
testExpression SqlExpression
ifTrue SqlExpression
ifFalse SqlExpression
Résultat SqlConditionalExpression

Constant() public static méthode

public static Constant ( Field value ) : SqlConstantExpression
value Field
Résultat SqlConstantExpression

Constant() public static méthode

public static Constant ( object value ) : SqlConstantExpression
value object
Résultat SqlConstantExpression

Divide() public static méthode

public static Divide ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Equal() public static méthode

public static Equal ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Evaluate() public méthode

Statically evaluates the expression, outside any context.
/// If any error occurred while evaluating the expression. ///
public Evaluate ( ) : SqlExpression
Résultat SqlExpression

Evaluate() public méthode

When overridden by a derived class, this method evaluates the expression within the provided context.

This method is only executed is CanEvaluate is true, and the override method can reduce this expression to a simpler form.

/// If any error occurred while evaluating the expression. ///
public Evaluate ( EvaluateContext context ) : SqlExpression
context EvaluateContext The context for the evaluation of the expression, providing /// access to the system or to the execution context.
Résultat SqlExpression

Evaluate() public méthode

public Evaluate ( IRequest context, IVariableResolver variables ) : SqlExpression
context IRequest
variables IVariableResolver
Résultat SqlExpression

Evaluate() public méthode

public Evaluate ( IRequest context, IVariableResolver variables, IGroupResolver group ) : SqlExpression
context IRequest
variables IVariableResolver
group IGroupResolver
Résultat SqlExpression

FunctionCall() public static méthode

public static FunctionCall ( ObjectName functionName ) : SqlFunctionCallExpression
functionName ObjectName
Résultat SqlFunctionCallExpression

FunctionCall() public static méthode

public static FunctionCall ( ObjectName functionName, InvokeArgument args ) : SqlFunctionCallExpression
functionName ObjectName
args InvokeArgument
Résultat SqlFunctionCallExpression

FunctionCall() public static méthode

public static FunctionCall ( ObjectName functionName, SqlExpression args ) : SqlFunctionCallExpression
functionName ObjectName
args SqlExpression
Résultat SqlFunctionCallExpression

FunctionCall() public static méthode

public static FunctionCall ( string functionName ) : SqlFunctionCallExpression
functionName string
Résultat SqlFunctionCallExpression

FunctionCall() public static méthode

public static FunctionCall ( string functionName, InvokeArgument args ) : SqlFunctionCallExpression
functionName string
args InvokeArgument
Résultat SqlFunctionCallExpression

FunctionCall() public static méthode

public static FunctionCall ( string functionName, SqlExpression args ) : SqlFunctionCallExpression
functionName string
args SqlExpression
Résultat SqlFunctionCallExpression

GetData() protected méthode

protected GetData ( SerializationInfo info, StreamingContext context ) : void
info SerializationInfo
context StreamingContext
Résultat void

GreaterOrEqualThan() public static méthode

public static GreaterOrEqualThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

GreaterThan() public static méthode

public static GreaterThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Is() public static méthode

public static Is ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

IsNot() public static méthode

public static IsNot ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Like() public static méthode

public static Like ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Modulo() public static méthode

public static Modulo ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Multiply() public static méthode

public static Multiply ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Negate() public static méthode

public static Negate ( SqlExpression operand ) : SqlUnaryExpression
operand SqlExpression
Résultat SqlUnaryExpression

Not() public static méthode

public static Not ( SqlExpression operand ) : SqlUnaryExpression
operand SqlExpression
Résultat SqlUnaryExpression

NotEqual() public static méthode

public static NotEqual ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

NotLike() public static méthode

public static NotLike ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Or() public static méthode

public static Or ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Parse() public static méthode

Parses the given SQL string to an expression that can be evaluated.
public static Parse ( string s ) : SqlExpression
s string The string to parse.
Résultat SqlExpression

Parse() public static méthode

Parses the given SQL string to an expression that can be evaluated.
public static Parse ( string s, IContext context ) : SqlExpression
s string The string to parse.
context IContext
Résultat SqlExpression

Prepare() public méthode

public Prepare ( IExpressionPreparer preparer ) : SqlExpression
preparer IExpressionPreparer
Résultat SqlExpression

Quantified() public static méthode

public static Quantified ( SqlExpressionType expressionType, SqlExpression value ) : SqlQuantifiedExpression
expressionType SqlExpressionType
value SqlExpression
Résultat SqlQuantifiedExpression

Reference() public static méthode

public static Reference ( ObjectName objectName ) : SqlReferenceExpression
objectName ObjectName
Résultat SqlReferenceExpression

SmallerOrEqualThan() public static méthode

public static SmallerOrEqualThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

SmallerThan() public static méthode

public static SmallerThan ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

Subtract() public static méthode

public static Subtract ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression

ToString() public méthode

public ToString ( ) : string
Résultat string

TryParse() public static méthode

public static TryParse ( string s, IExpressionParser parser, SqlExpression &expression ) : bool
s string
parser IExpressionParser
expression SqlExpression
Résultat bool

Tuple() public static méthode

public static Tuple ( SqlExpression expressions ) : SqlTupleExpression
expressions SqlExpression
Résultat SqlTupleExpression

Tuple() public static méthode

public static Tuple ( SqlExpression expr1, SqlExpression exp2 ) : SqlTupleExpression
expr1 SqlExpression
exp2 SqlExpression
Résultat SqlTupleExpression

Tuple() public static méthode

public static Tuple ( SqlExpression expr1, SqlExpression expr2, SqlExpression expr3 ) : SqlTupleExpression
expr1 SqlExpression
expr2 SqlExpression
expr3 SqlExpression
Résultat SqlTupleExpression

Unary() public static méthode

public static Unary ( SqlExpressionType expressionType, SqlExpression operand ) : SqlUnaryExpression
expressionType SqlExpressionType
operand SqlExpression
Résultat SqlUnaryExpression

UnaryPlus() public static méthode

public static UnaryPlus ( SqlExpression operand ) : SqlUnaryExpression
operand SqlExpression
Résultat SqlUnaryExpression

VariableReference() public static méthode

public static VariableReference ( string varName ) : SqlVariableReferenceExpression
varName string
Résultat SqlVariableReferenceExpression

XOr() public static méthode

public static XOr ( SqlExpression left, SqlExpression right ) : SqlBinaryExpression
left SqlExpression
right SqlExpression
Résultat SqlBinaryExpression