How do I get all the data of an instance in Localforage - Ionic

0

I have the following configuration

localforage.config({
  driver: localforage.WEBSQL,
  name: 'databaseName',
  version: 1.0,
  size: 4980736,
  storeName: 'databaseStore',
  description: 'some description'
});

The creation of the Instance

var store = localforage.createInstance({
  name: "tableName"
});

The addition of any data

let objData = { "Nombre": "Carlos", "Apellidos": "Cleves" };
store.setItem("124", objData).then(
  (data: any) => {
    console.log("Se adicionó con exito");
  },
  error => {
    console.log("error");
  }
);

So I get the information with the key without any problem

store.getItem("124").then(
      (data: any) => {
        console.log(data);
      },
      error => {
        console.log("error");
      }
    );

But I do not know how to get all the data from the "tableName" instance. Thank you very much for your help!

    
asked by Jesus David Cleves Martinez 30.04.2018 в 23:52
source

0 answers