Last updated 3 years ago
Was this helpful?
1.通过 tableName 或 tableID 实例化一个 TableObject 对象,操作该对象即相当于操作对应的数据表,这里推荐用 tableName
tableName
tableID
TableObject
TableObject myTableObject = new TableObject(tableName);
参数说明
tableName 和 tableID 二选一,不能同时存在
2.指定 recordId 执行获取相应数据项操作
recordId
myTableObject.get(recordId)
请求示例
返回结果
常见错误:
返回 TableRecord 示例,详见:
TableRecord
err 对象结构请参考
请参考章节
tableId
String
是
数据表的 ID
数据表名
记录 ID
String tableName = 'tableName'; String recordId = '5f4f8b77818361658051f504'; TableObject tableObject = new TableObject(tableName); try { TableRecord data = await tableObject.get(recordId); } catch (e) { print(e.toString()); }
404
数据行不存在