# EmailStoreTableQuery

Bounded Store table query with a typed filter AST, deterministic ordering, projection, and keyset continuation.

Class 

`OfficeIMO.Email.Store`

**Namespace**

`OfficeIMO.Email.Store`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`105ae88c45f6` with working tree changes

**Source**

[EmailStoreTableQuery.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L11)

**Modifiers**

sealed

Bounded Store table query with a typed filter AST, deterministic ordering, projection, and keyset continuation.

## Inheritance

- object
- EmailStoreTableQuery

## Usage

Explore 8 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 5

- Property [EmailStorePstSplitOptions.Query](/api/email/officeimo-email-store-emailstorepstsplitoptions/#property-query)
- Method [EmailStoreTableQuery.ContinueFrom](/api/email/officeimo-email-store-emailstoretablequery/#method-continuefrom-officeimo-email-store-emailstorecontinuationtoken)
- Method [EmailStoreTableQuery.OrderBy](/api/email/officeimo-email-store-emailstoretablequery/#method-orderby-officeimo-email-store-emailstoresort)
- Method [EmailStoreTableQuery.Select](/api/email/officeimo-email-store-emailstoretablequery/#method-select-officeimo-email-store-emailstorefield)
- Method [EmailStoreTableQuery.Where](/api/email/officeimo-email-store-emailstoretablequery/#method-where-officeimo-email-store-emailstorefilter)

### Accepted by parameters 3

- Method [EmailStorePstMutationTransaction.PatchItems](/api/email/officeimo-email-store-emailstorepstmutationtransaction/#method-patchitems-officeimo-email-store-emailstoretablequery-officeimo-email-store-emailstoreitempatch-threading-cancellationtoken) parameter `query`
- Constructor [EmailStorePstSplitOptions.EmailStorePstSplitOptions](/api/email/officeimo-email-store-emailstorepstsplitoptions/#constructor-ctor-officeimo-email-store-emailstoretablequery-int64-int64-int64-int32-boolean-boolean-boolean-boolean-int32-officeimo-email-emailsemanticcomparisonoptions-int32) parameter `query`
- Method [EmailStoreSession.SearchPage](/api/email/officeimo-email-store-emailstoresession/#method-searchpage-officeimo-email-store-emailstoretablequery-threading-cancellationtoken) parameter `query`

Filter members 

Show inherited

## Constructors

`public EmailStoreTableQuery(EmailStoreFolderId? folderId = null, bool includeDescendants = false, bool includeAssociatedItems = false, bool includeOrphanedItems = false, EmailStoreFilter? filter = null, IEnumerable<EmailStoreSort>? sorts = null, EmailStoreProjection? projection = null, EmailStoreContinuationToken? continuationToken = null, int maxItemsScanned = 1000000, int pageSize = 100)` [#](#member-1e43db60d4c722030fb303f9)

[EmailStoreTableQuery.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L11)

Creates an immutable table query.

Parameters

**folderId OfficeIMO.Email.Store.EmailStoreFolderId? = null optional**

**includeDescendants bool = false optional**

**includeAssociatedItems bool = false optional**

**includeOrphanedItems bool = false optional**

**filter OfficeIMO.Email.Store.EmailStoreFilter? = null optional**

**sorts System.Collections.Generic.IEnumerable<OfficeIMO.Email.Store.EmailStoreSort>? = null optional**

**projection OfficeIMO.Email.Store.EmailStoreProjection? = null optional**

**continuationToken OfficeIMO.Email.Store.EmailStoreContinuationToken? = null optional**

**maxItemsScanned int = 1000000 optional**

**pageSize int = 100 optional**

## Methods

`public EmailStoreTableQuery ContinueFrom(EmailStoreContinuationToken? token)` [#](#method-continuefrom-officeimo-email-store-emailstorecontinuationtoken)

[EmailStoreTableQuery.cs:83](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L83)

Returns a copy that resumes from the supplied continuation.

Parameters

**token OfficeIMO.Email.Store.EmailStoreContinuationToken? required**

Returns

`EmailStoreTableQuery`

`public EmailStoreQueryPlan Explain()` [#](#method-explain)

[EmailStoreTableQuery.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L95)

Returns the deterministic execution plan without reading item payloads.

Returns

`EmailStoreQueryPlan`

`public EmailStoreTableQuery OrderBy(params EmailStoreSort[] sorts)` [#](#method-orderby-officeimo-email-store-emailstoresort)

[EmailStoreTableQuery.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L89)

Returns a copy with a different ordered column list.

Parameters

**sorts OfficeIMO.Email.Store.EmailStoreSort[] required**

Returns

`EmailStoreTableQuery`

`public EmailStoreTableQuery Select(params EmailStoreField[] fields)` [#](#method-select-officeimo-email-store-emailstorefield)

[EmailStoreTableQuery.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L92)

Returns a copy with a different table projection.

Parameters

**fields OfficeIMO.Email.Store.EmailStoreField[] required**

Returns

`EmailStoreTableQuery`

`public EmailStoreTableQuery Where(EmailStoreFilter filter)` [#](#method-where-officeimo-email-store-emailstorefilter)

[EmailStoreTableQuery.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L86)

Returns a copy with a different typed filter.

Parameters

**filter OfficeIMO.Email.Store.EmailStoreFilter required**

Returns

`EmailStoreTableQuery`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public EmailStoreFolderId? FolderId { get; }` [#](#property-folderid)

[EmailStoreTableQuery.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L53)

Optional typed folder scope.

`public bool IncludeDescendants { get; }` [#](#property-includedescendants)

[EmailStoreTableQuery.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L56)

Whether descendants of [EmailStoreTableQuery.FolderId](/api/email/officeimo-email-store-emailstoretablequery/) are included.

`public bool IncludeAssociatedItems { get; }` [#](#property-includeassociateditems)

[EmailStoreTableQuery.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L59)

Whether folder-associated information is included.

`public bool IncludeOrphanedItems { get; }` [#](#property-includeorphaneditems)

[EmailStoreTableQuery.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L62)

Whether source-index orphans are included.

`public EmailStoreFilter Filter { get; }` [#](#property-filter)

[EmailStoreTableQuery.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L65)

Typed expression tree evaluated over lightweight references and summaries.

`public IReadOnlyList<EmailStoreSort> Sorts { get; }` [#](#property-sorts)

[EmailStoreTableQuery.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L68)

Caller-requested ordering. Stable folder/item tie-breakers are appended internally.

`public EmailStoreProjection Projection { get; }` [#](#property-projection)

[EmailStoreTableQuery.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L71)

Selected output columns.

`public EmailStoreContinuationToken? ContinuationToken { get; }` [#](#property-continuationtoken)

[EmailStoreTableQuery.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L74)

Optional keyset continuation from a compatible earlier page.

`public int MaxItemsScanned { get; }` [#](#property-maxitemsscanned)

[EmailStoreTableQuery.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L77)

Maximum lightweight references evaluated per execution.

`public int PageSize { get; }` [#](#property-pagesize)

[EmailStoreTableQuery.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.Email/Store/Reading/EmailStoreTableQuery.cs#L80)

Maximum rows returned in one page.

<!-- PowerForge markdown artifact sha256:71709B95DCCC0E1FB0E31E9CED933476F4B581C731CD4C3734CB5A71F828D8C6 -->
