internal override BooleanFunction CompileToFunction(QueryCompilationContext context, GraphViewConnection dbConnection)
        {
            QueryCompilationContext    subContext = new QueryCompilationContext(context);
            GraphViewExecutionOperator subQueryOp = Subquery.SubQueryExpr.Compile(subContext, dbConnection);
            ExistsFunction             existsFunc = new ExistsFunction(subQueryOp, subContext.OuterContextOp);

            return(existsFunc);
        }
        internal override BooleanFunction CompileToFunction(QueryCompilationContext context, GraphViewCommand command)
        {
            QueryCompilationContext subContext = new QueryCompilationContext(context);
            Container container = new Container();

            subContext.OuterContextOp.SetContainer(container);
            GraphViewExecutionOperator subQueryOp = Subquery.SubQueryExpr.Compile(subContext, command);
            ExistsFunction             existsFunc = new ExistsFunction(subQueryOp, container);

            return(existsFunc);
        }
        internal override BooleanFunction CompileToBatchFunction(QueryCompilationContext context, GraphViewCommand command)
        {
            QueryCompilationContext subContext = new QueryCompilationContext(context);
            Container container = new Container();

            subContext.OuterContextOp.SetContainer(container);
            subContext.AddField(GremlinKeyword.IndexTableName, command.IndexColumnName, ColumnGraphType.Value, true);
            subContext.InBatchMode = true;

            GraphViewExecutionOperator subQueryOp = this.Subquery.SubQueryExpr.Compile(subContext, command);
            ExistsFunction             existsFunc = new ExistsFunction(subQueryOp, container);

            return(existsFunc);
        }