# Class: Record

## Record()

#### new Record()

记录

Source:
  - Record.js, line 11

### Methods

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

构造一个新的 Record 对象。

Source:
  - Record.js, line 21

##### Returns:

Type
  Promise.<Record>

#### (async, static) getFields() → {Promise.<Fields>}

获取属性结构

Source:
  - Record.js, line 243

##### Returns:

Fields对象

Type
  Promise.<Fields>

#### (async, static) getFieldTypeByIndex(fldIndex) → {Promise.<Number>}

获取字段类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 字段索引

Source:
  - Record.js, line 216

##### Returns:

字段类型

Type
  Promise.<Number>

#### (async, static) getFieldTypeByName(fldName) → {Promise.<Number>}

获取字段类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` |  | 字段名

Source:
  - Record.js, line 230

##### Returns:

字段类型

Type
  Promise.<Number>

#### (async, static) getFldValByIndex(fldIndex) → {Promise.<Field>}

根据字段索引取字段值

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 字段索引

Source:
  - Record.js, line 38

##### Returns:

字段值

Type
  Promise.<Field>

#### (async, static) getFldValByName(fldName) → {Promise.<string>}

根据字段名取字段值

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` |  | 字段名

Source:
  - Record.js, line 53

##### Returns:

字段值

Type
  Promise.<string>

#### (async, static) isFldNULLOfFldIndex(fldIndex) → {Promise.<Number>}

判断字段值是否为NULL

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 字段索引

Source:
  - Record.js, line 147

##### Returns:

非0/0 ：是/否

Type
  Promise.<Number>

#### (async, static) isFldNULLOfFldName(fldName) → {Promise.<Number>}

判断字段值是否为NULL

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` |  | 字段名

Source:
  - Record.js, line 161

##### Returns:

非0/0 ：是/否

Type
  Promise.<Number>

#### (async, static) releaseBuffer() → {Promise.<void>}

释放缓冲区 如果调用SetFldValue设置Blob或者Binary类型的字段值，则必须调用该函数释放内存空间

Source:
  - Record.js, line 273

##### Returns:

Type
  Promise.<void>

#### (async, static) setAllFldNULL() → {Promise.<Number>}

设置所有字段值为NULL

Source:
  - Record.js, line 202

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFields(Flds) → {Promise.<Number>}

设置属性结构

##### Parameters:

Name | Type | Description
--- | --- | ---
`Flds` |  | Fields对象

Source:
  - Record.js, line 260

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldFromStrOfIndex(fldIndex, newVal) → {Promise.<Number>}

将字符串设置为字段值

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 字段索引
`newVal` |  | 字符串值

Source:
  - Record.js, line 117

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldFromStrOfName(fldName, newVal) → {Promise.<Number>}

将字符串设置为字段值

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` |  | 字段名
`newVal` |  | 字符串值

Source:
  - Record.js, line 132

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldNULLByIndex(fldIndex) → {Promise.<Number>}

设置字段值为NULL

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` |  | 字段索引

Source:
  - Record.js, line 175

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldNULLByName(fldName) → {Promise.<Number>}

设置字段值为NULL

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` |  | 字段名

Source:
  - Record.js, line 189

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldValByIndex(fldIndex, 字段值(Object为Date)) → {Promise.<Number>}

根据字段索引设置字段值，暂时只支持FieldType.fldStr\fldFloat\fldDouble\fldLong\fldInt64\fldFloat\fldShort\fldTimeStamp\fldDate\fldTime类型
注：fldTimeStamp传递数值的时间戳；fldTime\fldDate可直接传递JS的Date对象

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldIndex` | Number | 字段索引
`字段值(Object为Date)` | Number | String | Object |

Source:
  - Record.js, line 72

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>

#### (async, static) setFldValByName(fldName, newVal) → {Promise.<Number>}

根据字段名设置字段值，暂时只支持FieldType.fldStr\fldFloat\fldDouble\fldLong\fldInt64\fldFloat\fldShort\fldTimeStamp\fldDate\fldTime类型
注：fldTimeStamp传递数值的时间戳；fldTime\fldDate可直接传递JS的Date对象

##### Parameters:

Name | Type | Description
--- | --- | ---
`fldName` | String | 字段名
`newVal` | Number | String | Object | 字段值(Object为Date)

Source:
  - Record.js, line 96

##### Returns:

大于0成功，否则失败

Type
  Promise.<Number>