title: Delete Sugar ORM database table records
body: <p>I have a listview with some name and url.. After my app starts I check if there is any record in my local database. So if there is, First clear my old records then fill table columns with listview data and if there isn't just insert data... this is how I'm doing it :</p>
  
  <pre><code>List&lt;LocalProduct&gt; allAuthors = LocalProduct.listAll(LocalProduct.class);
  if (allAuthors == null) {
      for (int allList=0;allList&lt;adapter.getCount();allList++){
          Product my = adapter.getItem(allList);
          String offline_name = my.name.toString().trim();
          String offline_url = my.image_url.toString().trim();
          LocalProduct book = new LocalProduct(offline_name, offline_url);
          book.save();
          }
      }else {
  
          /*
          SugarContext.terminate();
          SchemaGenerator schemaGenerator = new SchemaGenerator(getContext());
          schemaGenerator.deleteTables(new SugarDb(getContext()).getDB());
          SugarContext.init(getContext());
          schemaGenerator.createDatabase(new SugarDb(getContext()).getDB());
          */
  
      for (int allList=0;allList&lt;adapter.getCount();allList++){
          Product my = adapter.getItem(allList);
          String offline_name = my.name.toString().trim();
          String offline_url = my.image_url.toString().trim();
          LocalProduct book = new LocalProduct(offline_name, offline_url);
          book.save();
          }
      }
  </code></pre>
  
  <p>Commented area of my code will Delete and recreate the tables and this will cause a delay every time... How can I just delete my records !?</p>