Package com.foundationdb.qp.operator

Examples of com.foundationdb.qp.operator.ExpressionGenerator


import com.foundationdb.sql.optimizer.rule.TypeResolver;

public final class ExpressionGenerators {
    public static ExpressionGenerator field(final Column column, final int position)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new TPreparedField(column.getType(), position);
            }
        };
View Full Code Here


    }

    public static ExpressionGenerator compare(final ExpressionGenerator left, final Comparison comparison,
                                              final ExpressionGenerator right, final TCastResolver castResolver)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                TPreparedExpression leftExpr = left.getTPreparedExpression();
                TPreparedExpression rightExpr = right.getTPreparedExpression();
View Full Code Here

        return field(rowType.typeAt(rowTypeIndex), fieldIndex);
    }

    public static ExpressionGenerator field(final TInstance type, final int position)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new TPreparedField(type, position);
            }
        };
View Full Code Here

        };
    }

    public static ExpressionGenerator existsSubquery(final Operator innerPlan, final RowType outer, final RowType inner, final int bindingPos)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new ExistsSubqueryTExpression(innerPlan, outer, inner, bindingPos);
            }
        };
View Full Code Here

            }
        };
    }

    public static ExpressionGenerator scalarSubquery(final Operator innerPlan, final ExpressionGenerator expression, final RowType outer, final RowType inner, final int pos) {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new ScalarSubqueryTExpression(innerPlan, expression.getTPreparedExpression(), outer, inner, pos);
            }
        };
View Full Code Here

            }
        };
    }

    public static ExpressionGenerator anySubquery(final Operator innerPlan, final ExpressionGenerator expression, final RowType outer, final RowType inner, final int pos) {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new AnySubqueryTExpression(innerPlan, expression.getTPreparedExpression(), outer, inner, pos);
            }
        };
View Full Code Here

        return IndexKeyRange.bounded(indexRowType, lo, loInclusive, hi, hiInclusive);
    }

    public static ExpressionGenerator literal(final Object value)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                TPreptimeValue tpv = ValueSources.fromObject(value, (TInstance) null);
               
                //FromObjectValueSource valueSource = new FromObjectValueSource().setReflectively(value);
View Full Code Here

        };
    }

    public static ExpressionGenerator literal (final Object value, final TInstance type)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                TPreptimeValue tpv = ValueSources.fromObject(value, type);
                return new TPreparedLiteral(tpv.type(), tpv.value());
            }
View Full Code Here

        };
    }

    public static ExpressionGenerator variable(final TInstance type, final int position)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new TPreparedParameter(position, type);
            }
        };
View Full Code Here

        };
    }

    public static ExpressionGenerator boundField(final RowType rowType, final int rowPosition, final int fieldPosition)
    {
        return new ExpressionGenerator() {
            @Override
            public TPreparedExpression getTPreparedExpression() {
                return new TPreparedBoundField(rowType, rowPosition, fieldPosition);
            }
        };
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.operator.ExpressionGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.