# Class: QueryDef

## QueryDef()

#### new QueryDef()

扩展字段头

Source:
  - QueryDef.js, line 9

### Methods

#### (async, static) createObj() → {Promise.<QueryDef>}

构造一个新的 QueryDef 对象。

Source:
  - QueryDef.js, line 19

##### Returns:

QueryDef 对象。

Type
  Promise.<QueryDef>

#### (async, static) setFilter(whereClause) → {Promise}

设置属性查询条件

##### Parameters:

Name | Type | Description
--- | --- | ---
`whereClause` |  | 属性查询条件

Source:
  - QueryDef.js, line 36

##### Returns:

成功:>0;失败：<=0

Type
  Promise

#### (async, static) setNear(dot, xmax, xmin) → {Promise}

Near点查询

##### Parameters:

Name | Type | Description
--- | --- | ---
`dot` |  | 点坐标
`xmax` |  | x最大值
`xmin` |  | x最小值

Source:
  - QueryDef.js, line 100

##### Returns:

成功:>0;失败：<=0

Type
  Promise

#### (async, static) setRect(rect, queryMode) → {Promise}

矩形范围查询条件

##### Parameters:

Name | Type | Description
--- | --- | ---
`rect` |  | 矩形范围
`queryMode` |  | 空间查询模式

Source:
  - QueryDef.js, line 65

##### Returns:

成功:>0;失败：<=0

Type
  Promise

#### (async, static) setSpatial(geom, queryMode) → {Promise}

设置空间查询条件

##### Parameters:

Name | Type | Description
--- | --- | ---
`geom` |  | 空间查询条件
`queryMode` |  | 空间查询模式

Source:
  - QueryDef.js, line 80

##### Returns:

成功:>0;失败：<=0

Type
  Promise

#### (async, static) setSubFields(flds) → {Promise}

属性相关选项设置,设置查询结果字段集

##### Parameters:

Name | Type | Description
--- | --- | ---
`flds` |  | 查询结果字段集

Source:
  - QueryDef.js, line 50

##### Returns:

成功:>0;失败：<=0

Type
  Promise