How to use the react-native-sqlite-storage.echoTest function in react-native-sqlite-storage

To help you get started, we’ve selected a few react-native-sqlite-storage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andpor / react-native-sqlite-storage / test / index.ios.promise.js View on Github external
loadAndQueryDB = () => {
    this.updateProgress("Plugin integrity check ...");
    SQLite.echoTest().then(() => {
      this.updateProgress("Integrity check passed ...");
      this.updateProgress("Opening database ...");
      SQLite.openDatabase(database_name, database_version, database_displayname, database_size).then((DB) => {
        db = DB;
        this.updateProgress("Database OPEN");
        this.populateDatabase(DB);
      }).catch((error) => {
        console.log(error);
      });
    }).catch(error => {
      this.updateProgress("echoTest failed - plugin not functional");
    });
  };