# Interface QueryProvider

Provides query capability for one or more data/FeatureSource!FeatureSources.

interface QueryProvider {
count(source: FeatureSource, where: string, options?: QueryOptions): Promise<CountResult>;
isSupported(source: FeatureSource): boolean;
query(source: FeatureSource | FeatureSource[], where: string, options?: QueryOptions): AsyncIterable<Feature, any, any>;
}

#### Implemented by

- QueryProviderBase

#####
Index

### Methods

count
isSupported
query

##
Methods

### count

- count(source, where, options?): Promise<CountResult>

- Queries a given feature source for a count of features that match the query criteria.

  #### Parameters

  - source: FeatureSource

    The source to query.

  - where: string

    An SQL expression to match against, e.g. "lastName='Smith'".

  - `Optional` options: QueryOptions

    Additional options that affect the query.

  #### Returns Promise<CountResult>

### isSupported

- isSupported(source): boolean

- Determines whether this provider can handle queries for the given feature source.

  #### Parameters

  - source: FeatureSource

    The feature source.

  #### Returns boolean

### query

- query(source, where, options?): AsyncIterable<Feature, any, any>

- Queries a given feature source for features that match the query criteria.

  #### Parameters

  - source: FeatureSource | FeatureSource[]

    The source to query.

  - where: string

    An SQL expression to match against, e.g. "lastName='Smith'".

  - `Optional` options: QueryOptions

    Additional options that affect the query.

  #### Returns AsyncIterable<Feature, any, any>