本文整理汇总了C#中Deveel.Data.Sql.Expressions.SqlExpression类的典型用法代码示例。如果您正苦于以下问题:C# SqlExpression类的具体用法?C# SqlExpression怎么用?C# SqlExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqlExpression类属于Deveel.Data.Sql.Expressions命名空间,在下文中一共展示了SqlExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeupFunctions
private static int MakeupFunctions(PreparedQuerySelectColumns columnSet, IList<SqlExpression> aggregateFunctions, out SqlExpression[] defFunList, out string[] defFunNames)
{
// Make up the functions list,
var functionsList = columnSet.FunctionColumns.ToList();
int fsz = functionsList.Count;
var completeFunList = new List<object>();
for (int i = 0; i < fsz; ++i) {
var scol = functionsList[i];
completeFunList.Add(scol.Expression);
completeFunList.Add(scol.InternalName.Name);
}
for (int i = 0; i < aggregateFunctions.Count; ++i) {
completeFunList.Add(aggregateFunctions[i]);
completeFunList.Add("HAVINGAGG_" + (i + 1));
}
int fsz2 = completeFunList.Count / 2;
defFunList = new SqlExpression[fsz2];
defFunNames = new string[fsz2];
for (int i = 0; i < fsz2; ++i) {
defFunList[i] = (SqlExpression)completeFunList[i * 2];
defFunNames[i] = (string)completeFunList[(i * 2) + 1];
}
return fsz;
}
示例2: WhileLoopStatement
public WhileLoopStatement(SqlExpression conditionExpression)
{
if (conditionExpression == null)
throw new ArgumentNullException("conditionExpression");
ConditionExpression = conditionExpression;
}
示例3: Visit
public override SqlExpression Visit(SqlExpression expression)
{
if (expression is QueryReferenceExpression)
VisitQueryReference((QueryReferenceExpression) expression);
return base.Visit(expression);
}
示例4: JoinAt
public void JoinAt(int betweenIndex, JoinType joinType, SqlExpression onExpression)
{
var planLeft = tablePlans[betweenIndex];
var planRight = tablePlans[betweenIndex + 1];
planLeft.RightJoin(planRight, joinType, onExpression);
planRight.LeftJoin(planLeft, joinType, onExpression);
}
示例5: ToSqlString
public string ToSqlString(SqlExpression expression)
{
rootQuery = expression is SqlQueryExpression;
Visit(expression);
return builder.ToString();
}
示例6: JoinNode
public JoinNode(IQueryPlanNode left, IQueryPlanNode right, ObjectName leftColumnName, SqlExpressionType @operator, SqlExpression rightExpression)
: base(left, right)
{
LeftColumnName = leftColumnName;
Operator = @operator;
RightExpression = rightExpression;
}
示例7: SimpleSelectNode
public SimpleSelectNode(IQueryPlanNode child, ObjectName columnName, SqlExpressionType op, SqlExpression expression)
: base(child)
{
ColumnName = columnName;
OperatorType = op;
Expression = expression;
}
示例8: SetPasswordAction
public SetPasswordAction(SqlExpression passwordExpression)
{
if (passwordExpression == null)
throw new ArgumentNullException("passwordExpression");
PasswordExpression = passwordExpression;
}
示例9: InvokeArgument
public InvokeArgument(string name, SqlExpression value)
{
if (value == null)
throw new ArgumentNullException("value");
Name = name;
Value = value;
}
示例10: SelectColumn
/// <summary>
/// Constructs a new <see cref="SelectColumn"/> for the given
/// expression and aliased with the given name.
/// </summary>
/// <param name="expression">The <see cref="Expression"/> used for select
/// a column within a <c>SELECT</c> statement.</param>
/// <param name="alias">The name to alias the resulted expression.</param>
public SelectColumn(SqlExpression expression, string alias)
{
if (expression == null)
throw new ArgumentNullException("expression");
Expression = expression;
Alias = alias;
}
示例11: ExpressionReference
public ExpressionReference(SqlExpression expression, string @alias)
{
if (expression == null)
throw new ArgumentNullException("expression");
Alias = alias;
Expression = expression;
}
示例12: GroupNode
public GroupNode(IQueryPlanNode child, ObjectName[] columnNames, ObjectName groupMaxColumn, SqlExpression[] functions, string[] names)
: base(child)
{
ColumnNames = columnNames;
GroupMaxColumn = groupMaxColumn;
Functions = functions;
Names = names;
}
示例13: CheckViolationException
internal CheckViolationException(ObjectName tableName, string constraintName, SqlExpression expression,
ConstraintDeferrability deferrability)
: base(SystemErrorCodes.CheckViolation, FormatMessage(tableName, constraintName, expression, deferrability))
{
TableName = tableName;
ConstraintName = constraintName;
CheckExpression = expression;
Deferrability = deferrability;
}
示例14: JoinPart
internal JoinPart(JoinType joinType, SqlQueryExpression subQuery, SqlExpression onExpression)
{
if (subQuery == null)
throw new ArgumentNullException("subQuery");
OnExpression = onExpression;
JoinType = joinType;
SubQuery = subQuery;
}
示例15: FunctionTable
public FunctionTable(ITable table, SqlExpression[] functionList, string[] columnNames, IRequest queryContext)
: base(queryContext.Context)
{
// Make sure we are synchronized over the class.
lock (typeof(FunctionTable)) {
uniqueId = uniqueKeySeq;
++uniqueKeySeq;
}
uniqueId = (uniqueId & 0x0FFFFFFF) | 0x010000000;
context = queryContext;
ReferenceTable = table;
varResolver = table.GetVariableResolver();
varResolver = varResolver.ForRow(0);
// Create a DataTableInfo object for this function table.
funTableInfo = new TableInfo(FunctionTableName);
expList = new SqlExpression[functionList.Length];
expInfo = new byte[functionList.Length];
// Create a new DataColumnInfo for each expression, and work out if the
// expression is simple or not.
for (int i = 0; i < functionList.Length; ++i) {
var expr = functionList[i];
// Examine the expression and determine if it is simple or not
if (expr.IsConstant() && !expr.HasAggregate(context)) {
// If expression is a constant, solve it
var result = expr.Evaluate(context, null);
if (result.ExpressionType != SqlExpressionType.Constant)
throw new InvalidOperationException();
expr = result;
expList[i] = expr;
expInfo[i] = 1;
} else {
// Otherwise must be dynamic
expList[i] = expr;
expInfo[i] = 0;
}
// Make the column info
funTableInfo.AddColumn(columnNames[i], expr.ReturnType(context, varResolver));
}
// Make sure the table info isn't changed from this point on.
funTableInfo = funTableInfo.AsReadOnly();
// routine tables are the size of the referring table.
rowCount = table.RowCount;
// Set schemes to 'blind search'.
SetupIndexes(DefaultIndexTypes.BlindSearch);
}