数据表
数据表
try {
// 通过 `tableName` 实例化一个 `Table` 对象,操作该对象即相当于操作对应的数据表
Table product = new Table("product");
// 本地创建一条空记录
Record record = product.createRecord();
record.put("name", "apple");
record.put("price", 1);
record.put("desc", Arrays.asList("good"));
record.put("amout", 0);
// 为上面创建的空记录赋值,并保存到服务器
record.save();
// 操作成功
} catch (Exception e) {
// 操作失败
}Last updated
Was this helpful?