Example #1
0
        public override SelectorStatement UseAsEndOfTempTableAndClone(IncludeIdentitySelectorStatement includeIdentitySelectorStatement)
        {
            var clone = new DocumentStatement(_storage)
            {
                SelectClause = SelectClause,
                Orderings    = Orderings,
                Mode         = StatementMode.Select,
                ExportName   = ExportName,
            };

            // Select the Ids only
            SelectClause = includeIdentitySelectorStatement;

            clone.Where = new InTempTableWhereFragment(includeIdentitySelectorStatement.ExportName, "id");
            Limit       = Offset = 0;

            return(clone);
        }
Example #2
0
        public override SelectorStatement UseAsEndOfTempTableAndClone(IncludeIdentitySelectorStatement includeIdentitySelectorStatement)
        {
            var clone = new DocumentStatement(_storage)
            {
                SelectClause           = SelectClause,
                Orderings              = Orderings,
                Mode                   = StatementMode.Select,
                ExportName             = ExportName,
                SingleValue            = SingleValue,
                CanBeMultiples         = CanBeMultiples,
                ReturnDefaultWhenEmpty = ReturnDefaultWhenEmpty
            };

            // Select the Ids only
            SelectClause = includeIdentitySelectorStatement;

            clone.Where = _storage.FilterDocuments(null, new InTempTableWhereFragment(includeIdentitySelectorStatement.ExportName, "id"));

            return(clone);
        }
Example #3
0
        public override SelectorStatement UseAsEndOfTempTableAndClone(IncludeIdentitySelectorStatement includeIdentitySelectorStatement)
        {
            var clone = new DocumentStatement(Storage)
            {
                SelectClause           = SelectClause,
                Orderings              = Orderings,
                Mode                   = StatementMode.Select,
                ExportName             = ExportName,
                SingleValue            = SingleValue,
                CanBeMultiples         = CanBeMultiples,
                ReturnDefaultWhenEmpty = ReturnDefaultWhenEmpty,
                Limit                  = Limit,
                Offset                 = Offset
            };

            // Select the Ids only
            SelectClause = includeIdentitySelectorStatement;

            // Don't do any paging here, or it'll break the Statistics
            clone.Where = new InTempTableWhereFragment(includeIdentitySelectorStatement.ExportName, "id", PagedStatement.Empty, false);

            return(clone);
        }