1. IQueryingClient

Interface IQueryingClient

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Contains functionality to query and scroll for entities.

Namespace: Stylelabs.M.Sdk.Clients
Assembly: Stylelabs.M.Sdk.dll
Syntax
public interface IQueryingClient

Methods

CreateEntityIdIterator(Query)

Creates an IEntityIterator that iterates over all ids matched by the Query.

Declaration
IIdIterator CreateEntityIdIterator(Query query)
Parameters
TypeNameDescription
Queryquery

The query to iterate.

Returns
TypeDescription
IIdIterator

An iterator.

CreateEntityIdScroller(Query, Nullable<TimeSpan>)

Creates an IIdScroller that scrolls over all ids of entities that match the Query.

Declaration
IIdScroller CreateEntityIdScroller(Query query, TimeSpan? scrollTime = null)
Parameters
TypeNameDescription
Queryquery

The query to scroll.

System.Nullable<TimeSpan>scrollTime

The time for the scroll to live. If it is not specified, ScrollTime will be used. The scroll time should not be too long, just enough to process each batch of results.

Returns
TypeDescription
IIdScroller

An IIdScroller instance.

Remarks

Use scrolling wisely and try to limit the scrollTime for the scroll to live. Using scrolling inappropriately can cause performance issues. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html for more information.

CreateEntityIterator(Query, IEntityLoadConfiguration)

Creates an IEntityIterator that iterates over all results matched by the Query.

Declaration
IEntityIterator CreateEntityIterator(Query query, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
Queryquery

The query to iterate.

IEntityLoadConfigurationloadConfiguration

The load configuration. If it is null, then Default will be used.

Returns
TypeDescription
IEntityIterator

An iterator.

Remarks

For compatibility with the 3.0 SDK, the loading configuration is resolved as follows:

  1. The loadConfiguration will be used, if not null.
  2. The IQueryLoadConfiguration from the query will be used, if not null and if applicable.
  3. Otherwise, defaults to Default.

CreateEntityScroller(Query, Nullable<TimeSpan>, IEntityLoadConfiguration)

Creates an IEntityScroller that scrolls over all entities that match the Query.

Declaration
IEntityScroller CreateEntityScroller(Query query, TimeSpan? scrollTime = null, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
Queryquery

The query to scroll.

System.Nullable<TimeSpan>scrollTime

The time for the scroll to live. If it is not specified, ScrollTime will be used. The scroll time should not be too long, just enough to process each batch of results.

IEntityLoadConfigurationloadConfiguration

The load configuration. If it is null, then Default will be used.

Returns
TypeDescription
IEntityScroller

An IEntityScroller instance.

Remarks

Use scrolling wisely and try to limit the scrollTime for the scroll to live. Using scrolling inappropriately can cause performance issues. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html for more information.

QueryAsync(Query, IEntityLoadConfiguration)

Retrieves entities matching the query.

Declaration
Task<IEntityQueryResult> QueryAsync(Query query, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
Queryquery

The query to execute.

IEntityLoadConfigurationloadConfiguration

The load configuration. If it is null, then Default will be used.

Returns
TypeDescription
Task<IEntityQueryResult>

An IEntityQueryResult containing the results of the query.

Remarks

For compatibility with the 3.0 SDK, the loading configuration is resolved as follows:

  1. The loadConfiguration will be used, if not null.
  2. The IQueryLoadConfiguration from the query will be used, if not null and if applicable.
  3. Otherwise, defaults to Default.

QueryIdsAsync(Query)

Retrieves the ids of entities matching the query.

Declaration
Task<IIdQueryResult> QueryIdsAsync(Query query)
Parameters
TypeNameDescription
Queryquery

The query to execute.

Returns
TypeDescription
Task<IIdQueryResult>

An IEntityQueryResult containing the results of the query.

SingleAsync(Query, IEntityLoadConfiguration)

Gets a single entity that matches the query.

Declaration
Task<IEntity> SingleAsync(Query query, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
Queryquery

The query to execute.

IEntityLoadConfigurationloadConfiguration

The load configuration. If it is null, then Default will be used.

Returns
TypeDescription
Task<IEntity>

The entity that matches the query or null if there are no results.

Remarks

For compatibility with the 3.0 SDK, the loading configuration is resolved as follows:

  1. The loadConfiguration will be used, if not null.
  2. The IQueryLoadConfiguration from the query will be used, if not null and if applicable.
  3. Otherwise, defaults to Default.

SingleIdAsync(Query)

Gets a the id of the entity that matches the query.

Declaration
Task<long?> SingleIdAsync(Query query)
Parameters
TypeNameDescription
Queryquery

The query to execute

Returns
TypeDescription
Task<System.Nullable<System.Int64>>

The id of the entity that matches the query or null if there are no results.

この記事を改善するための提案がある場合は、 お知らせください!