Constructor
new TableObject(tableName)
Parameters:
| Name | Type | Description | 
|---|---|---|
tableName | 
            
            string | 数据表名称 | 
- Source:
 
Extends
Methods
count() → {Promise.<number>}
    获取数据记录数量。
- Source:
 
Returns:
- Type
 - Promise.<number>
 
create() → {TableRecord}
    创建一条数据记录
- Source:
 
Returns:
- Type
 - TableRecord
 
createMany(args, optionsopt) → {Promise.<BaaS.Response.<any>>}
    批量创建数据记录
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
args | 
            
            Array.<object> | 数据记录列表 | |
options | 
            
            BaaS.CreateManyParams | 
                
                    <optional> | 
            
            
            批量创建参数 | 
- Source:
 
Returns:
- Type
 - Promise.<BaaS.Response.<any>>
 
delete(query, optionsopt) → {Promise.<any>}
    批量删除数据记录
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
query | 
            
            Query | 数据记录查询条件 | |
options | 
            
            BaaS.BatchUpdateParams | 
                
                    <optional> | 
            
            
            批量操作参数 | 
- Source:
 
Returns:
- Type
 - Promise.<any>
 
delete(recordID) → {Promise.<any>}
    删除数据记录
    Parameters:
| Name | Type | Description | 
|---|---|---|
recordID | 
            
            string | 数据记录 ID | 
- Source:
 
Returns:
- Type
 - Promise.<any>
 
expand(key) → {this}
    指定需要展开的 pointer 类型字段
    Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
            
            Array.<string> | string | 字段名称 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
find(optionsopt) → {Promise.<BaaS.Response.<any>>}
    获取数据记录列表。
    Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
options | 
            
            BaaS.FindOptions | 
                
                    <optional> | 
            
            
            参数 | 
- Source:
 
Returns:
- Type
 - Promise.<BaaS.Response.<any>>
 
get(recordID) → {Promise.<BaaS.Response.<any>>}
    获取单条数据记录。
    Parameters:
| Name | Type | Description | 
|---|---|---|
recordID | 
            
            string | 数据记录 ID | 
- Source:
 
Returns:
- Type
 - Promise.<BaaS.Response.<any>>
 
getWithoutData(query) → {TableRecord}
    获取多个数据记录,用于更新等操作(仅引用,非数据)
    Parameters:
| Name | Type | Description | 
|---|---|---|
query | 
            
            Query | 数据记录查询条件 | 
- Source:
 
Returns:
- Type
 - TableRecord
 
getWithoutData(recordID) → {TableRecord}
    获取一个数据记录,用于更新等操作(仅引用,非数据)
    Parameters:
| Name | Type | Description | 
|---|---|---|
recordID | 
            
            string | 数据记录 ID | 
- Source:
 
Returns:
- Type
 - TableRecord
 
limit(count) → {this}
    指定最多返回数量
    Parameters:
| Name | Type | Description | 
|---|---|---|
count | 
            
            number | 数量 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
offset(count) → {this}
    设置列表偏移量
    Parameters:
| Name | Type | Description | 
|---|---|---|
count | 
            
            number | 偏移量 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
orderBy(key) → {this}
    设置排序依据
    Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
            
            Array.<string> | string | 字段名称 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
select(key) → {this}
    选择只返回指定字段
    Parameters:
| Name | Type | Description | 
|---|---|---|
key | 
            
            Array.<string> | string | 字段名称 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
setQuery(Query) → {this}
    设置查询条件
    Parameters:
| Name | Type | Description | 
|---|---|---|
Query | 
            
            BaaS.Query | 对象 | 
- Overrides:
 - Source:
 
Returns:
- Type
 - this
 
subscribe()
    订阅数据变化事件
- Source: