(package) new BaseRecord()
- Source:
Methods
append(key, value) → {this}
数组添加元素。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
string | 值 |
- Source:
Returns:
- Type
- this
incrementBy(key, value) → {this}
自增(原子操作)。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
number | 值 |
- Source:
Returns:
- Type
- this
patchObject(key, value) → {this}
Object 类型字段修改。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
object | 值 |
- Source:
Returns:
- Type
- this
pop(key) → {this}
Array 类型字段修改,移除数组末位元素。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
- Source:
Returns:
- Type
- this
remove(key, value) → {this}
数组移除元素。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
string | 值 |
- Source:
Returns:
- Type
- this
set(key, value) → {this}
给字段赋值
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
string | 值 |
- Source:
Returns:
- Type
- this
set(particialRecord) → {this}
批量给字段赋值
Parameters:
Name | Type | Description |
---|---|---|
particialRecord |
Object.<string, any> | 由字段名称与值组成的键值对对象 |
- Source:
Returns:
- Type
- this
shift(key) → {this}
Array 类型字段修改,移除数组首位元素。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
- Source:
Returns:
- Type
- this
uAppend(key, value) → {this}
数组添加元素(原子操作)。
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
value |
Array.<string> | string | 值 |
- Source:
Returns:
- Type
- this
unset(key) → {this}
移除字段
Parameters:
Name | Type | Description |
---|---|---|
key |
string | 字段名称 |
- Source:
Returns:
- Type
- this
unset(particialRecord) → {this}
批量移除字段
Parameters:
Name | Type | Description |
---|---|---|
particialRecord |
Object.<string, any> | 由字段名称与值组成的键值对对象, 接口会忽略 Object 里所有的 value,参照所有的 key 来执行移除操作。 |
- Source:
Returns:
- Type
- this