0

我正在使用 Taffy DB 将数据存储在我的应用程序中。

我已经在 Taffy DB 中插入了数据,例如,

var teamList = TAFFY();
teamList.insert(data);

现在我想检查数据是否插入到数据库中。

请指教

4

2 回答 2

2

要查看数据,您需要使用 Taffy Query

尝试:

console.log(teamList().get());

Taffy 查询返回一个包含数据的数组。

db().get(); // returns array with all stored data

您可以像这样在查询中使用 where:

db({column:value}).get(); - is like select * from table where column = value

更多信息:http ://www.taffydb.com/writingqueries

于 2014-01-22T17:46:51.690 回答
2

尝试:

teamList.last();

返回最后添加的记录。

于 2014-02-03T20:12:57.993 回答