View the data inserted into Taffy Database

1.7k views Asked by At

I am using Taffy DB to store the data in my application.

I have inserted data inti Taffy DB like,

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

Now I want to check whether the data is inserted into the DB.

Please Advice

2

There are 2 answers

0
diegoguevara On

To view data you need to use Taffy Query

try:

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

Taffy query returns an array with data.

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

You can use where in query like this:

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

more info: http://www.taffydb.com/writingqueries

0
Marcovnickov On

Try:

teamList.last();

Returns the last record added.